function ModuleGrantsEntityTestCase::assertViewAllNodesFunction in Module Grants 7
1 call to ModuleGrantsEntityTestCase::assertViewAllNodesFunction()
- ModuleGrantsEntityTestCase::testViewAllNodesFunction in module_grants_entity/
module_grants_entity.test
File
- module_grants_entity/
module_grants_entity.test, line 93
Class
Code
function assertViewAllNodesFunction($permissions, $access) {
$permissions += array(
'access content',
);
$account = $this
->drupalCreateUser($permissions);
$msg = t("For user with permissions @permissions, _module_grants_node_access_view_all_nodes returns @access.", array(
'@permissions' => implode(',', $permissions),
'@access' => $access ? 'true' : 'false',
));
$this
->assertEqual($access, _module_grants_node_access_view_all_nodes($account), $msg);
}