function RulesTestCase::testAccessCheck in Rules 8.3
Same name and namespace in other branches
- 7.2 tests/rules.test \RulesTestCase::testAccessCheck()
Test access checks.
File
- d7-tests/
rules_test_case.test, line 701 - Rules 7.x tests.
Class
Code
function testAccessCheck() {
$rule = rule();
// Try to set a property which is provided by the test module and is not
// accessible, so the access check has to return FALSE.
$rule
->action('data_set', array(
'data:select' => 'site:no-access-user',
'value' => 'foo',
));
$this
->assertTrue($rule
->access() === FALSE, 'Access check is working.');
}