You are here

public function CacheFlushUICRUDAccessTest::accessInterface in CacheFlush 8

Test interface listed entity views access.

1 call to CacheFlushUICRUDAccessTest::accessInterface()
CacheFlushUICRUDAccessTest::testAccess in modules/cacheflush_ui/tests/src/Functional/CacheFlushUICRUDAccessTest.php
Run CRUD access test functions.

File

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

Class

CacheFlushUICRUDAccessTest
Test cacheflush UI access on links and interface.

Namespace

Drupal\cacheflush_ui\Tests

Code

public function accessInterface() {
  $this
    ->drupalLogin($this->interfaceUser);

  // Check Access on the list interface.
  $this
    ->drupalGet('admin/structure/cacheflush');
  $this
    ->assertNoRaw('LoggedUserEntity');
  $this
    ->assertNoRaw('AdminUserEntity');
  $this
    ->assertRaw('InterfaceUserEntity');
  $this
    ->assertNoRaw('InterfaceUser2Entity');

  // User has access on the own entity to all operations.
  $this
    ->assertLink('Edit', 0);
  $this
    ->assertLink('Delete', 0);
  $this
    ->drupalLogout();
}