You are here

public function CacheFlushUICRUDAccessTest::setUp in CacheFlush 8

Sets up the test.

Overrides BrowserTestBase::setUp

File

modules/cacheflush_ui/tests/src/Functional/CacheFlushUICRUDAccessTest.php, line 100

Class

CacheFlushUICRUDAccessTest
Test cacheflush UI access on links and interface.

Namespace

Drupal\cacheflush_ui\Tests

Code

public function setUp() {
  parent::setUp();
  $role1 = [
    'cacheflush clear cache',
    'cacheflush administer',
    'cacheflush clear any',
    'cacheflush create new',
    'cacheflush view any',
    'cacheflush edit any',
    'cacheflush delete any',
  ];
  $this->adminUser = $this
    ->drupalCreateUser($role1);
  $role2 = [
    'cacheflush clear cache',
    'cacheflush clear own',
    'cacheflush create new',
    'cacheflush view own',
    'cacheflush edit own',
    'cacheflush delete own',
  ];
  $this->loggedUser = $this
    ->drupalCreateUser($role2);
  $role3 = [
    'cacheflush administer',
    'cacheflush view own',
    'cacheflush edit own',
    'cacheflush delete own',
  ];
  $this->interfaceUser = $this
    ->drupalCreateUser($role3);
  $role4 = [
    'cacheflush administer',
    'cacheflush view any',
    'cacheflush edit own',
  ];
  $this->interfaceUser2 = $this
    ->drupalCreateUser($role4);
}