function NodeApiExampleTestCase::setUp in Examples for Developers 6
Same name and namespace in other branches
- 7 nodeapi_example/nodeapi_example.test \NodeApiExampleTestCase::setUp()
Enable modules and create user with specific permissions.
Overrides DrupalWebTestCase::setUp
File
- nodeapi_example/
nodeapi_example.test, line 36 - Test case for Testing the node API example module.
Class
- NodeApiExampleTestCase
- @file Test case for Testing the node API example module.
Code
function setUp() {
parent::setUp('nodeapi_example');
// Create admin user. This module has no access control, so we can use a
// trusted user. Revision access and revert permissions are required too.
$this->web_user = $this
->drupalCreateUser(array(
'administer nodes',
// Required to set revision checkbox
'administer content types',
'view revisions',
'revert revisions',
));
// Login the admin user.
$this
->drupalLogin($this->web_user);
}