function FlagHookFlagAccessTestCase::testFlagAccessDeny in Flag 7.3
Verifies that the user does not see the flag if a module returns FALSE (Deny).
File
- tests/
flag.test, line 1058 - Tests for the Flag module.
Class
- FlagHookFlagAccessTestCase
- Verifies the implementation of hook_flag_access().
Code
function testFlagAccessDeny() {
variable_set('FlagHookFlagAccessTestCaseMode', 'deny');
$flag_user = $this
->drupalCreateUser(array(
'flag test_flag',
'unflag test_flag',
));
$this
->drupalLogin($flag_user);
// Look at our node.
$this
->drupalGet('node/' . $this->nid);
$this
->assertNoLink('Flag this item', 0, 'The flag link does not appear on the page.');
}