function RulesTestCase::createTestRule
Same name in other branches
- 7.x-2.x tests/rules.test \RulesTestCase::createTestRule()
2 calls to RulesTestCase::createTestRule()
- RulesTestCase::testRulesCRUD in d7-tests/
rules_test_case.test - Tests CRUD functionality.
- RulesTestCase::testSorting in d7-tests/
rules_test_case.test - Test sorting rule elements.
File
-
d7-tests/
rules_test_case.test, line 42
Class
Code
protected function createTestRule() {
$rule = rule();
$rule->condition('rules_test_condition_true')
->condition('rules_test_condition_true')
->condition(rules_or()->condition(rules_condition('rules_test_condition_true')->negate())
->condition('rules_test_condition_false')
->condition(rules_and()->condition('rules_test_condition_false')
->condition('rules_test_condition_true')
->negate()));
$rule->action('rules_test_action');
return $rule;
}