diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php index 5457ec7..8607458 100644 --- a/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php @@ -169,14 +169,15 @@ public function testCloneDisplay() { $view = views_get_view($view['name']); $view->initDisplay(); - $displays = $view->displayHandlers; - $this->assertTrue($displays['page_2'], 'The new page display got saved.'); - $this->assertTrue($displays['block_1'], 'The new block display got saved.'); - $this->assertEqual($displays['page_2']->display['display_title'], 'Page'); - $this->assertEqual($displays['block_1']->display['display_plugin'], 'block'); - $this->assertEqual($displays['block_1']->display['display_title'], 'Block', 'The new display title got generated as expected.'); - $this->assertEqual($displays['block_1']->getOption('title'), $random_title, 'The overridden title option from the display got copied into the clone'); - $this->assertEqual($displays['block_1']->getOption('css_class'), $random_css, 'The overridden css_class option from the display got copied into the clone'); + $page_2 = $view->displayHandlers->get('page_2'); + $this->assertTrue($page_2, 'The new page display got saved.'); + $this->assertEqual($page_2->display['display_title'], 'Page'); + $block_1 = $view->displayHandlers->get('block_1'); + $this->assertTrue($block_1, 'The new block display got saved.'); + $this->assertEqual($block_1->display['display_plugin'], 'block'); + $this->assertEqual($block_1->display['display_title'], 'Block', 'The new display title got generated as expected.'); + $this->assertEqual($block_1->getOption('title'), $random_title, 'The overridden title option from the display got copied into the clone'); + $this->assertEqual($block_1->getOption('css_class'), $random_css, 'The overridden css_class option from the display got copied into the clone'); } /**