public function AuthcacheCommentTest::testEditLinkNoSubstitutionWhenEditNotAllowed in Authenticated User Page Caching (Authcache) 7.2
Test the edit-link when edit is not allowed.
Cover authcache_comment_comment_view_alter()
File
- modules/
authcache_comment/ authcache_comment.test, line 267 - Test cases for the Authcache Comment module.
Class
- AuthcacheCommentTest
- Tests for markup substitution.
Code
public function testEditLinkNoSubstitutionWhenEditNotAllowed() {
$this->stubmod
->hook('authcache_p13n_client', array(
'authcache_p13n_test' => array(
'title' => t('Test Client'),
'enabled' => TRUE,
),
));
// The role of M1 does not have the 'edit own comments' permission.
// Therefore Authcache Comment should not substitute the markup for
// edit-links.
$this
->drupalLogin($this->member1);
$comment = $this
->postComment($this->node, $this
->randomName(8));
$this
->drupalGet('node/' . $this->node->nid);
$this
->assertNoLink('edit');
}