You are here

public function ViewExecutableTest::testFactoryService in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Tests/ViewExecutableTest.php \Drupal\views\Tests\ViewExecutableTest::testFactoryService()

Tests the views.executable container service.

File

core/modules/views/src/Tests/ViewExecutableTest.php, line 103
Contains \Drupal\views\Tests\ViewExecutableTest.

Class

ViewExecutableTest
Tests the ViewExecutable class.

Namespace

Drupal\views\Tests

Code

public function testFactoryService() {
  $factory = $this->container
    ->get('views.executable');
  $this
    ->assertTrue($factory instanceof ViewExecutableFactory, 'A ViewExecutableFactory instance was returned from the container.');
  $view = entity_load('view', 'test_executable_displays');
  $this
    ->assertTrue($factory
    ->get($view) instanceof ViewExecutable, 'A ViewExecutable instance was returned from the factory.');
}