1 node_hooks_example.test public NodeHooksExampleTestCase::setUp()

Enables modules and creates users with specific permissions.

Overrides BackdropWebTestCase::setUp

File

modules/examples/node_hooks_example/tests/node_hooks_example.test, line 33
Test case for testing the Node Hooks Example module.

Class

NodeHooksExampleTestCase
Functional tests for the Node Hooks Example module.

Code

public function setUp() {
  parent::setUp('nodeapi_example');
  module_disable(array('path'));

  // Create the 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->backdropCreateUser(array(
    // Required to set revision checkbox.
    'administer nodes',
    'administer content types',
    'administer fields',
    'bypass node access',
    'view revisions',
    'revert revisions',
  ));
  // Log in the admin user.
  $this->backdropLogin($this->webUser);
}