You are here

public function BlockExampleTestCase::setUp in Examples for Developers 7

Enable modules and create user with specific permissions.

Overrides DrupalWebTestCase::setUp

File

block_example/block_example.test, line 30
Test case for testing the block example module.

Class

BlockExampleTestCase
Functional tests for the Block Example module.

Code

public function setUp() {
  parent::setUp('block_example', 'search');

  // Create user. Search content permission granted for the search block to
  // be shown.
  $this->webUser = $this
    ->drupalCreateUser(array(
    'administer blocks',
    'search content',
    'access contextual links',
  ));
}