public function AuthcacheFlagTest::testAuthcacheFlagFlagFragmentNoPermission in Authenticated User Page Caching (Authcache) 7.2
Ensure that flags are not rendered when user lacks flag permissions.
Covers AuthcacheFlagFlagFragment
File
- modules/
authcache_flag/ authcache_flag.test, line 486 - Test cases for the Authcache Flag module.
Class
- AuthcacheFlagTest
- Tests for markup substitution.
Code
public function testAuthcacheFlagFlagFragmentNoPermission() {
$partial = _authcache_flag_partial_id($this->nodeFlag);
$url = authcache_p13n_request_get_callback('asm/flags', array(
$partial => array(
$this->node1->nid,
$this->node2->nid,
),
));
$this
->assertTrue($url);
$result = $this
->drupalGetAJAX($GLOBALS['base_root'] . $url['path'], $url['options'], array(
'X-Authcache: 1',
));
$this
->assertResponse(200);
$this
->assertFalse($result);
}