diff --git a/core/modules/views/lib/Drupal/views/ViewExecutableFactory.php b/core/modules/views/lib/Drupal/views/ViewExecutableFactory.php index 12981c0..5b33f57 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutableFactory.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutableFactory.php @@ -23,7 +23,7 @@ class ViewExecutableFactory { * @return \Drupal\views\ViewExecutable * A ViewExecutable instance. */ - public function get(ViewStorageInterface $view) { + public static function get(ViewStorageInterface $view) { return new ViewExecutable($view); } diff --git a/core/modules/views/tests/Drupal/views/Tests/Controller/ViewAjaxControllerTest.php b/core/modules/views/tests/Drupal/views/Tests/Controller/ViewAjaxControllerTest.php index 1dd6fa2..c4ac06f 100644 --- a/core/modules/views/tests/Drupal/views/Tests/Controller/ViewAjaxControllerTest.php +++ b/core/modules/views/tests/Drupal/views/Tests/Controller/ViewAjaxControllerTest.php @@ -119,7 +119,7 @@ public function testAccessDeniedView() { ->method('access') ->will($this->returnValue(FALSE)); - $this->executableFactory->expects($this->once()) + $this->executableFactory->staticExpects($this->once()) ->method('get') ->with($view) ->will($this->returnValue($executable)); @@ -166,7 +166,7 @@ protected function setupValidMocks() { ->method('preview') ->will($this->returnValue(array('#markup' => 'View result'))); - $this->executableFactory->expects($this->once()) + $this->executableFactory->staticExpects($this->once()) ->method('get') ->with($view) ->will($this->returnValue($executable));