You are here

public function AdminToolbarTest::testEmptyMenuEntriesAreGone in Thunder 8.3

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/Integration/AdminToolbarTest.php \Drupal\Tests\thunder\Functional\Integration\AdminToolbarTest::testEmptyMenuEntriesAreGone()
  2. 8.2 tests/src/Functional/Integration/AdminToolbarTest.php \Drupal\Tests\thunder\Functional\Integration\AdminToolbarTest::testEmptyMenuEntriesAreGone()
  3. 8.4 tests/src/Functional/Integration/AdminToolbarTest.php \Drupal\Tests\thunder\Functional\Integration\AdminToolbarTest::testEmptyMenuEntriesAreGone()
  4. 6.2.x tests/src/Functional/Integration/AdminToolbarTest.php \Drupal\Tests\thunder\Functional\Integration\AdminToolbarTest::testEmptyMenuEntriesAreGone()
  5. 6.0.x tests/src/Functional/Integration/AdminToolbarTest.php \Drupal\Tests\thunder\Functional\Integration\AdminToolbarTest::testEmptyMenuEntriesAreGone()
  6. 6.1.x tests/src/Functional/Integration/AdminToolbarTest.php \Drupal\Tests\thunder\Functional\Integration\AdminToolbarTest::testEmptyMenuEntriesAreGone()

Tests empty menu groups are gone with admin_toolbar_links_access_filter.

File

tests/src/Functional/Integration/AdminToolbarTest.php, line 17

Class

AdminToolbarTest
Tests integration with the admin toolbar.

Namespace

Drupal\Tests\thunder\Functional\Integration

Code

public function testEmptyMenuEntriesAreGone() {
  $this
    ->logWithRole('seo');
  $this
    ->assertSession()
    ->elementNotExists('css', 'nav a[href="/admin/config/people"]');
  $this
    ->assertSession()
    ->elementNotExists('css', 'nav a[href="/admin/config/system"]');
  $this
    ->assertSession()
    ->elementNotExists('css', 'nav a[href="/admin/config/content"]');
  $this
    ->assertSession()
    ->elementNotExists('css', 'nav a[href="/admin/config/development"]');
  $this
    ->assertSession()
    ->elementNotExists('css', 'nav a[href="/admin/config/media"]');
  $this
    ->assertSession()
    ->elementExists('css', 'nav a[href="/admin/config/search"]');
}