You are here

public function MenuAdminPerMenuAccessTest::testMenusOverviewAccess in Menu Admin per Menu 8

Test result for the menu overview access callback.

@covers ::menusOverviewAccess

File

tests/src/Kernel/MenuAdminPerMenuAccessTest.php, line 249

Class

MenuAdminPerMenuAccessTest
Class MenuAdminPerMenuAccessTest.

Namespace

Drupal\Tests\menu_admin_per_menu\Kernel

Code

public function testMenusOverviewAccess() {
  $this
    ->assertEquals(new AccessResultNeutral(), $this->menuAdminPerMenuAllowedMenus
    ->menusOverviewAccess($this->anonymousUser));
  $this
    ->assertEquals(new AccessResultNeutral(), $this->menuAdminPerMenuAllowedMenus
    ->menusOverviewAccess($this->authenticatedUser));
  $this
    ->assertEquals(new AccessResultAllowed(), $this->menuAdminPerMenuAllowedMenus
    ->menusOverviewAccess($this->adminUser));
  $this
    ->assertEquals(new AccessResultAllowed(), $this->menuAdminPerMenuAllowedMenus
    ->menusOverviewAccess($this->adminMenuUser));
  $this
    ->assertEquals(new AccessResultAllowed(), $this->menuAdminPerMenuAllowedMenus
    ->menusOverviewAccess($this->menu1User));
  $this
    ->assertEquals(new AccessResultAllowed(), $this->menuAdminPerMenuAllowedMenus
    ->menusOverviewAccess($this->menu2User));
  $this
    ->assertEquals(new AccessResultAllowed(), $this->menuAdminPerMenuAllowedMenus
    ->menusOverviewAccess($this->menu3User));
}