function viewsFieldViewTestCase::testNormalView in Views Field View 7
@todo Test normal view embedding.
File
- tests/
views_field_view.test, line 49 - Contains the test for views_field_view
Class
- viewsFieldViewTestCase
- @file Contains the test for views_field_view
Code
function testNormalView() {
// Get the child view and add it to the database, so it can be used later.
$child_view = $this
->view_child_normal();
$child_view
->save();
views_invalidate_cache();
$parent_view = $this
->view_parent_normal();
$parent_view
->preview();
// Check that the child view has the same title as the parent one
foreach ($parent_view->result as $index => $values) {
$title = $parent_view->style_plugin
->get_field($index, 'title');
$child_view_field = $parent_view->style_plugin
->get_field($index, 'view');
$this
->assertContains($title, $child_view_field);
}
// Sadly it's impossible to check the actual result of the child view, because the object is not saved.
}