You are here

public function RuleConditionSetTestCase::testEvaluate in Conditional Rules 8

Same name and namespace in other branches
  1. 7 tests/rules_conditional.test \RuleConditionSetTestCase::testEvaluate()

Tests evaluation.

File

tests/rules_conditional.test, line 586
SimpleTest testing suites.

Class

RuleConditionSetTestCase
Rule condition set tests.

Code

public function testEvaluate() {
  $set = $this
    ->createConditionSet();
  $this
    ->assert($this
    ->doTestEvaluate($set), 'Rule condition set correctly evaluates.');

  // Test evaluating in a component.
  $set
    ->save('rule_condition_set_test');
  $comp = $this
    ->createTestComponent($set);
  $comp
    ->execute('test');
  $this
    ->pass('Rule condition set evaluates to FALSE as a condition.');
  $this
    ->assertExecution('condition set', $comp, array(
    'condition set',
  ), 'Rule condition set evaluates to TRUE as a condition.');
}