function 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.
File
-
core/
modules/ simpletest/ src/ WebTestBase.php, line 244
Class
- WebTestBase
- Test case for typical Drupal tests.
Namespace
Drupal\simpletestCode
protected function assertNoBlockAppears(Block $block) {
$result = $this->findBlockInstance($block);
$this->assertFalse(!empty($result), new FormattableMarkup('Ensure the block @id does not appear on the page', [
'@id' => $block->id(),
]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.