public function AuthcacheP13nTestMarkup::testDefaultFallbackMarkup in Authenticated User Page Caching (Authcache) 7.2
Cover theme_authcache_p13n_X default fallback markup.
File
- modules/
authcache_p13n/ tests/ authcache_p13n.markup.test, line 165 - Define tests for markup substitution.
Class
- AuthcacheP13nTestMarkup
- Tests for markup substitution.
Code
public function testDefaultFallbackMarkup() {
$this
->createRequestHandlers();
$client_fallback_alter_stub = $this->stubmod
->hook('authcache_p13n_client_fallback_alter');
$expect = '<!-- Error: Failed to render fragment -->';
$result = theme('authcache_p13n_fragment', array(
'fragment' => 'a-frag',
));
$this
->assertEqual($expect, $result, t('Default markup when fragment is not renderable'));
$expect = '<!-- Error: Failed to render setting -->';
$result = theme('authcache_p13n_setting', array(
'setting' => 'a-setting',
));
$this
->assertEqual($expect, $result, t('Default markup when setting is not renderable'));
$expect = '<!-- Error: Failed to render assembly -->';
$result = theme('authcache_p13n_assembly', array(
'assembly' => 'an-assembly',
));
$this
->assertEqual($expect, $result, t('Default markup when assembly is not renderable'));
$expect = '<!-- Error: Failed to render partial -->';
$result = theme('authcache_p13n_partial', array(
'assembly' => 'an-assembly',
'partial' => 'a-partial',
));
$this
->assertEqual($expect, $result, t('Default markup when partial is not renderable'));
$this
->assertStub($client_fallback_alter_stub, HookStub::times(4));
}