function PhpTestBase::createNodeWithCode

Creates a test node with PHP code in the body.

Return value

stdObject Node object.

2 calls to PhpTestBase::createNodeWithCode()

File

drupal/core/modules/php/lib/Drupal/php/Tests/PhpTestBase.php, line 60
Definition of Drupal\php\Tests\PhpTestBase.

Class

PhpTestBase
Defines a base PHP test case class.

Namespace

Drupal\php\Tests

Code

function createNodeWithCode() {
  return $this
    ->drupalCreateNode(array(
    'body' => array(
      array(
        'value' => '<?php print "SimpleTest PHP was executed!"; ?>',
      ),
    ),
  ));
}