public function RulesTestCase::testAccessCheck in Rules 7.2
Same name and namespace in other branches
- 8.3 d7-tests/rules_test_case.test \RulesTestCase::testAccessCheck()
Tests access checks.
File
- tests/
rules.test, line 741 - Rules tests.
Class
- RulesTestCase
- Rules test cases.
Code
public 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.');
}