You are here

public function BlockClassTestCase::setUp in Block Class 7

Same name and namespace in other branches
  1. 7.2 block_class.test \BlockClassTestCase::setUp()

Enable modules and create user with specific permissions.

By default Test Cases are carried on the "Main page content" Block.

Overrides DrupalWebTestCase::setUp

2 calls to BlockClassTestCase::setUp()
BlockClassContextTestCase::setUp in ./block_class.test
Enable modules and create user with specific permissions.
BlockClassPermissionTestCase::setUp in ./block_class.test
Enable modules and create user with specific permissions.
2 methods override BlockClassTestCase::setUp()
BlockClassContextTestCase::setUp in ./block_class.test
Enable modules and create user with specific permissions.
BlockClassPermissionTestCase::setUp in ./block_class.test
Enable modules and create user with specific permissions.

File

./block_class.test, line 45
Test the Block Class module.

Class

BlockClassTestCase
Provides common functionality for the Block Class test classes.

Code

public function setUp() {

  // Merge inherited classes modules, see FieldUITestCase for an example.
  $modules = func_get_args();
  if (isset($modules[0]) && is_array($modules[0])) {
    $modules = $modules[0];
  }
  $modules[] = 'block_class';
  parent::setUp($modules);

  // Authenticate test user.
  $this->privilegedUser = $this
    ->drupalCreateUser($this->permissions);
  $this
    ->drupalLogin($this->privilegedUser);
}