protected function ViewTestBase::assertBlockAppears

Checks to see whether a block appears on the page.

Parameters

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

2 calls to ViewTestBase::assertBlockAppears()
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 240
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 assertBlockAppears(Block $block) {
  $result = $this
    ->findBlockInstance($block);
  $this
    ->assertTrue(!empty($result), format_string('Ensure the block @id appears on the page', array(
    '@id' => $block
      ->id(),
  )));
}