function NodeApiExampleTestCase::setUp

Enables modules and create user with specific permissions.

Parameters

...: List of modules to enable for the duration of the test. This can be either a single array or a variable number of string arguments.

Overrides DrupalWebTestCase::setUp

File

nodeapi_example/nodeapi_example.test, line 43

Class

NodeApiExampleTestCase
Functional tests for the NodeAPI Example module.

Code

public 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->webUser = $this->drupalCreateUser(array(
    // Required to set revision checkbox.
'administer nodes',
    'administer content types',
    'bypass node access',
    'view revisions',
    'revert revisions',
  ));
  // Login the admin user.
  $this->drupalLogin($this->webUser);
}