public function ViewsRulesViewLoopTestCase::testImportInvalidDisplay in Views Rules 7
Tests importing a view loop for an invalid display.
File
- tests/
views_rules.test, line 281 - Simpletest implementations.
Class
- ViewsRulesViewLoopTestCase
- Rules plugin tests.
Code
public function testImportInvalidDisplay() {
$export = $this
->getFileContents('view_loop_test_invalid_display.export.txt');
$message = 'Importing view loop for missing display triggers integrity error.';
try {
/** @var $rules_config RulesPlugin */
$rules_config = entity_import('rules_config', $export);
$rules_config
->integrityCheck();
$this
->fail($message);
} catch (RulesIntegrityException $e) {
$this
->pass($message);
}
}