public function RulesConditionalWhileTestCase::testEvaluate in Conditional Rules 7
Same name and namespace in other branches
- 8 tests/rules_conditional.test \RulesConditionalWhileTestCase::testEvaluate()
Tests evaluation.
File
- tests/
rules_conditional.test, line 502 - SimpleTest testing suites.
Class
- RulesConditionalWhileTestCase
- While tests.
Code
public function testEvaluate() {
// Cap iteration limit to prevent long-running tests.
variable_set('rules_conditional_max_iterations', 100);
$comp = $this
->createTestComponent();
$this
->assert($this
->doTestEvaluate($comp), 'While loop correctly evaluates.');
// Constrain iteration limit and test again.
variable_set('rules_conditional_max_iterations', 5);
$this
->assert($this
->doTestEvaluate($comp, 5), 'While loop correctly evaluates with limited number of iterations.');
}