You are here

public function CacheFlushUICRUDAccessTest::setUp in CacheFlush 7.3

Sets up the test.

Overrides DrupalWebTestCase::setUp

File

modules/cacheflush_ui/cacheflush_ui.test, line 290
Contains test suite for cacheflush ui module.

Class

CacheFlushUICRUDAccessTest
Defines a test for cacheflush ui module CRUD access.

Code

public function setUp() {
  parent::setUp('cacheflush_ui');
  $role1 = array(
    'cacheflush administer',
    'cacheflush clear any',
    'cacheflush create new',
    'cacheflush view any',
    'cacheflush edit any',
    'cacheflush delete any',
  );
  $this->admin_user = $this
    ->drupalCreateUser($role1);
  $role2 = array(
    'cacheflush clear own',
    'cacheflush create new',
    'cacheflush view own',
    'cacheflush edit own',
    'cacheflush delete own',
  );
  $this->logged_user = $this
    ->drupalCreateUser($role2);
  $role3 = array(
    'cacheflush administer',
    'cacheflush view own',
    'cacheflush edit own',
    'cacheflush delete own',
  );
  $this->interface_user = $this
    ->drupalCreateUser($role3);
  $role4 = array(
    'cacheflush administer',
    'cacheflush view any',
    'cacheflush edit own',
  );
  $this->interface_user2 = $this
    ->drupalCreateUser($role4);
  $this->anonymous_user = drupal_anonymous_user();
  $this
    ->createTestEntitys();
}