function PHPTestCase::createNodeWithCode
7.x php.test | PHPTestCase::createNodeWithCode() |
Creates a test node with PHP code in the body.
Return value
stdObject Node object.
2 calls to PHPTestCase::createNodeWithCode()
- PHPAccessTestCase::testNoPrivileges in drupal-7.x/
modules/ php/ php.test - Makes sure that the user can't use the PHP filter when not given access.
- PHPFilterTestCase::testPHPFilter in drupal-7.x/
modules/ php/ php.test - Makes sure that the PHP filter evaluates PHP code when used.
File
- drupal-7.x/
modules/ php/ php.test, line 45 - Tests for php.module.
Class
- PHPTestCase
- Defines a base PHP test case class.
Code
function createNodeWithCode() {
return $this->drupalCreateNode(array('body' => array(LANGUAGE_NONE => array(array('value' => '<?php print "SimpleTest PHP was executed!"; ?>')))));
}