You are here

protected function AuthcacheBlockTest::assertNoBlockOnPage in Authenticated User Page Caching (Authcache) 7.2

Test whether the given block is found on the page.

2 calls to AuthcacheBlockTest::assertNoBlockOnPage()
AuthcacheBlockTest::testFailingMarkupSubstitutionHideFallback in modules/authcache_block/authcache_block.test
Ensure that markup is substituted for authcache enabled blocks.
AuthcacheBlockTest::testMarkupSubstitution in modules/authcache_block/authcache_block.test
Ensure that markup is substituted for authcache enabled blocks.

File

modules/authcache_block/authcache_block.test, line 111
Test cases for the Authcache Block module.

Class

AuthcacheBlockTest
Tests for markup substitution.

Code

protected function assertNoBlockOnPage(stdClass $block, $region) {

  // Confirm that the custom block was found at the proper region.
  $xpath = $this
    ->buildXPathQuery('//div[@class=:region-class]//div[@id=:block-id]/*', array(
    ':region-class' => 'region region-' . str_replace('_', '-', $region),
    ':block-id' => 'block-' . $block->module . '-' . $block->delta,
  ));
  $this
    ->assertNoFieldByXPath($xpath, NULL, format_string('Block not found in %region_name region.', array(
    '%region_name' => $region,
  )));
}