function 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 modules/
php/ php.test - Makes sure that the user can't use the PHP filter when not given access.
- PHPFilterTestCase::testPHPFilter in modules/
php/ php.test - Makes sure that the PHP filter evaluates PHP code when used.
File
-
modules/
php/ php.test, line 45
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!"; ?>',
),
),
),
));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.