public function ViewExecutableTest::testFactoryService

Tests the views.exectuable container service.

File

drupal/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php, line 94
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.');
}