public function ViewsRulesFrameworkTestCase::testGetView in Views Rules 7
Tests retrieving a view by view and display names joined by a colon.
File
- tests/
views_rules.test, line 107 - Simpletest implementations.
Class
- ViewsRulesFrameworkTestCase
- Framework function tests.
Code
public function testGetView() {
$displayId = 'views_rules_1';
$view = views_rules_get_view('views_rules_test:' . $displayId);
$this
->assertTrue(is_object($view) && $view instanceof view, 'Iterator view can be retrieved.');
$this
->assertEqual($displayId, $view->current_display, 'Iterator display is active in retrieved view.');
$this
->assertTrue($view->display_handler instanceof views_rules_iterator, 'Iterator object is ready.');
}