1 nodeapi_example.test public NodeApiExampleTestCase::setUp()

Enables modules and create user with specific permissions.

Overrides BackdropWebTestCase::setUp

File

modules/examples/nodeapi_example/nodeapi_example.test, line 32
Test case for Testing the node API example module.

Class

NodeApiExampleTestCase
Functional tests for the NodeAPI Example module.

Code

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

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