diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php index b5c6711..e98d41b 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php @@ -9,6 +9,7 @@ use Symfony\Component\HttpFoundation\Response; use Drupal\views\ViewExecutable; +use Drupal\views\ViewExecutableFactory; use Drupal\views\DisplayBag; use Drupal\views\Plugin\views\display\DefaultDisplay; use Drupal\views\Plugin\views\display\Page; @@ -82,6 +83,16 @@ protected function setUp() { } /** + * Tests the views.exectuable container service. + */ + public function testFactoryService() { + $factory = drupal_container()->get('views.executable'); + $this->assertTrue($factory instanceof ViewExecutableFactory, 'An ViewExecutableFactory instance was returned from the container.'); + $view = entity_load('view', 'test_executable_displays'); + $this->assertTrue($factory->get($view) instanceof ViewExecutable, 'An ViewExecutable instance was returned from the factory.'); + } + + /** * Tests the initDisplay() and initHandlers() methods. */ public function testInitMethods() {