You are here

public function BlockClassTestCase::setUp in Block Class 7.2

Same name and namespace in other branches
  1. 7 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

5 calls to BlockClassTestCase::setUp()
BlockClassContextTestCase::setUp in ./block_class.test
Enable modules and create user with specific permissions.
BlockClassFeaturesTestCase::setUp in ./block_class.test
Enable modules and create user with specific permissions.
BlockClassMenuBlockTestCase::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.
BlockClassViewsTestCase::setUp in ./block_class.test
Enable modules and create the data necessary to run the tests.
5 methods override BlockClassTestCase::setUp()
BlockClassContextTestCase::setUp in ./block_class.test
Enable modules and create user with specific permissions.
BlockClassFeaturesTestCase::setUp in ./block_class.test
Enable modules and create user with specific permissions.
BlockClassMenuBlockTestCase::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.
BlockClassViewsTestCase::setUp in ./block_class.test
Enable modules and create the data necessary to run the tests.

File

./block_class.test, line 49
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);
}