You are here

public function RulesConditionalWhileTestCase::testImport in Conditional Rules 8

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

Tests importing.

File

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

Class

RulesConditionalWhileTestCase
While tests.

Code

public function testImport() {

  // Cap iteration limit to prevent long-running tests.
  variable_set('rules_conditional_max_iterations', 100);
  $export = $this
    ->getFileContents('while_test_export.txt');
  $comp = entity_import('rules_config', $export);
  $this
    ->assert($this
    ->doTestEvaluate($comp), 'Imported while loop correctly evaluates.');
}