--- 2409417-50.patch 2015-02-15 14:22:43.000000000 +1100 +++ 2409417-52.patch 2015-02-21 11:20:45.000000000 +1100 @@ -1,8 +1,17 @@ diff --git a/core/modules/views/src/Tests/Plugin/DisplayAttachmentTest.php b/core/modules/views/src/Tests/Plugin/DisplayAttachmentTest.php -index e1cd4ec..756f6c0 100644 +index e1cd4ec..9842ee4 100644 --- a/core/modules/views/src/Tests/Plugin/DisplayAttachmentTest.php +++ b/core/modules/views/src/Tests/Plugin/DisplayAttachmentTest.php -@@ -20,12 +20,22 @@ class DisplayAttachmentTest extends PluginTestBase { +@@ -7,6 +7,8 @@ + + namespace Drupal\views\Tests\Plugin; + ++use Drupal\views\Views; ++ + /** + * Tests the attachment display plugin. + * +@@ -20,12 +22,22 @@ class DisplayAttachmentTest extends PluginTestBase { * * @var array */ @@ -26,7 +35,7 @@ } -@@ -45,4 +55,54 @@ protected function testAttachment() { +@@ -45,4 +57,54 @@ protected function testAttachment() { $this->assertEqual(count($result), 1, 'The attachment is rendered before the actual view.'); } @@ -38,8 +47,8 @@ + $node = $this->drupalCreateNode(); + + // Ensure that the feed_1 display is attached to the page_1 display. -+ $view = $this->container->get('entity.manager')->getStorage('view')->load('test_attached_disabled'); -+ $view->getExecutable()->setDisplay('page_1'); ++ $view = Views::getView('test_attached_disabled'); ++ $view->setDisplay('page_1'); + $attached_displays = $view->getExecutable()->display_handler->getAttachedDisplays(); + $this->assertTrue(in_array('attachment_1', $attached_displays), 'The attachment_1 display is attached to the page display.'); + $this->assertTrue(in_array('attachment_2', $attached_displays), 'The attachment_2 display is attached to the page display.'); @@ -57,7 +66,7 @@ + $this->assertEqual(count($result), 1, 'The attachment is rendered after the actual view.'); + + // Disable the attachment_1 display. -+ $view->getExecutable()->displayHandlers->get('attachment_1')->setOption('enabled', FALSE); ++ $view->displayHandlers->get('attachment_1')->setOption('enabled', FALSE); + $view->save(); + + // Test that the before attachment is not displayed. @@ -69,7 +78,7 @@ + $this->assertEqual(count($result), 0, 'The attachment_1 is not rendered.'); + + // Disable the attachment_2 display. -+ $view->getExecutable()->displayHandlers->get('attachment_2')->setOption('enabled', FALSE); ++ $view->displayHandlers->get('attachment_2')->setOption('enabled', FALSE); + $view->save(); + + // Test that the after attachment is not displayed. @@ -82,10 +91,19 @@ + } } diff --git a/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php b/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php -index cef9bab..857430a 100644 +index cef9bab..eecb50b 100644 --- a/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php +++ b/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php -@@ -20,7 +20,7 @@ class DisplayFeedTest extends PluginTestBase { +@@ -7,6 +7,8 @@ + + namespace Drupal\views\Tests\Plugin; + ++use Drupal\views\Views; ++ + /** + * Tests the feed display plugin. + * +@@ -20,7 +22,7 @@ class DisplayFeedTest extends PluginTestBase { * * @var array */ @@ -94,7 +112,7 @@ /** * Modules to enable. -@@ -74,4 +74,36 @@ public function testFeedOutput() { +@@ -74,4 +76,36 @@ public function testFeedOutput() { $this->assertTrue(strpos($feed_icon[0]['href'], 'test-feed-display.xml'), 'The feed icon was found.'); } @@ -106,8 +124,8 @@ + $node = $this->drupalCreateNode(); + + // Ensure that the feed_1 display is attached to the page_1 display. -+ $view = $this->container->get('entity.manager')->getStorage('view')->load('test_attached_disabled'); -+ $view->getExecutable()->setDisplay('page_1'); ++ $view = Views::getView('test_attached_disabled'); ++ $view->setDisplay('page_1'); + $attached_displays = $view->getExecutable()->display_handler->getAttachedDisplays(); + $this->assertTrue(in_array('feed_1', $attached_displays), 'The feed display is attached to the page display.'); + @@ -118,7 +136,7 @@ + $this->assertTrue(strpos($feed_header[0]['href'], 'test-attached-disabled.xml'), 'Page display contains the correct feed URL.'); + + // Disable the feed display. -+ $view->getExecutable()->displayHandlers->get('feed_1')->setOption('enabled', FALSE); ++ $view->displayHandlers->get('feed_1')->setOption('enabled', FALSE); + $view->save(); + + // Ensure there is no link rel present on the page.