public function DisplayTest::testGetAttachedDisplays in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/Plugin/DisplayTest.php \Drupal\views\Tests\Plugin\DisplayTest::testGetAttachedDisplays()
Tests the getAttachedDisplays method.
File
- core/
modules/ views/ src/ Tests/ Plugin/ DisplayTest.php, line 156 - Contains \Drupal\views\Tests\Plugin\DisplayTest.
Class
- DisplayTest
- Tests the basic display plugin.
Namespace
Drupal\views\Tests\PluginCode
public function testGetAttachedDisplays() {
$view = Views::getView('test_get_attach_displays');
// Both the feed_1 and the feed_2 display are attached to the page display.
$view
->setDisplay('page_1');
$this
->assertEqual($view->display_handler
->getAttachedDisplays(), array(
'feed_1',
'feed_2',
));
$view
->setDisplay('feed_1');
$this
->assertEqual($view->display_handler
->getAttachedDisplays(), array());
}