protected function ViewTestBase::assertNoBlockAppears

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

Parameters

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

2 calls to ViewTestBase::assertNoBlockAppears()
DisplayBlockTest::testDeleteBlockDisplay in drupal/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
Tests removing a block display.
DisplayTest::testInvalidDisplayPlugins in drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php
Tests invalid display plugins.

File

drupal/core/modules/views/lib/Drupal/views/Tests/ViewTestBase.php, line 251
Contains \Drupal\views\Tests\ViewTestBase.

Class

ViewTestBase
Defines a base class for Views testing in the full web test environment.

Namespace

Drupal\views\Tests

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(),
  )));
}