You are here

public function CronExampleTestCase::setUp in Examples for Developers 7

Enable modules and create user with specific permissions.

Overrides DrupalWebTestCase::setUp

File

cron_example/cron_example.test, line 29
Test case for testing the cron example module.

Class

CronExampleTestCase
cron_example test class

Code

public function setUp() {
  parent::setUp('cron_example');

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