You are here

protected function WebTestBase::assertNoBlockAppears in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/WebTestBase.php \Drupal\simpletest\WebTestBase::assertNoBlockAppears()

Checks to see whether a block does not appears on the page.

Parameters

\Drupal\block\Entity\Block $block: The block entity to find on the page.

3 calls to WebTestBase::assertNoBlockAppears()
DisplayBlockTest::testDeleteBlockDisplay in core/modules/block/src/Tests/Views/DisplayBlockTest.php
Tests removing a block display.
DisplayTest::testInvalidDisplayPlugins in core/modules/views/src/Tests/Plugin/DisplayTest.php
Tests invalid display plugins.
ShortcutLinksTest::testShortcutBlockAccess in core/modules/shortcut/src/Tests/ShortcutLinksTest.php
Tests that the 'access shortcuts' permission is required to access the shortcut block.

File

core/modules/simpletest/src/WebTestBase.php, line 462
Contains \Drupal\simpletest\WebTestBase.

Class

WebTestBase
Test case for typical Drupal tests.

Namespace

Drupal\simpletest

Code

protected function assertNoBlockAppears(Block $block) {
  $result = $this
    ->findBlockInstance($block);
  $this
    ->assertFalse(!empty($result), format_string('Ensure the block @id does not appear on the page', array(
    '@id' => $block
      ->id(),
  )));
}