public function SimpleTestExampleTestCase::setUp in Examples for Developers 6
Same name and namespace in other branches
- 7 simpletest_example/simpletest_example.test \SimpleTestExampleTestCase::setUp()
setUp() performs any pre-requisite tasks that need to happen.
Overrides DrupalWebTestCase::setUp
File
- simpletest_example/
simpletest_example.test, line 33 - An example of SimpleTest tests to accompany the tutorial at http://drupal.org/node/395012.
Class
- SimpleTestExampleTestCase
- Tests the SimpleTest Example module's content type.
Code
public function setUp() {
// Enable any modules required for the test.
parent::setUp('simpletest_example');
// Create and log in our privileged user.
$this->privileged_user = $this
->drupalCreateUser(array(
'create simpletest_example',
'edit own simpletest_example',
));
$this
->drupalLogin($this->privileged_user);
}