You are here

public function ViewsRulesViewLoopTestCase::testImport in Views Rules 7

Tests importing a view loop.

File

tests/views_rules.test, line 269
Simpletest implementations.

Class

ViewsRulesViewLoopTestCase
Rules plugin tests.

Code

public function testImport() {
  $export = $this
    ->getFileContents('view_loop_test.export.txt');
  $comp = entity_import('rules_config', $export);
  $data = $this
    ->createSiteData();
  $expectedData = array(
    $data['node1']->title,
    $data['node2']->title,
    $data['node3']->title,
  );
  $result = $comp
    ->execute($data['term']);
  $this
    ->assertIdentical($expectedData, reset($result), 'Imported view loop evaluates correctly.');
}