You are here

public function ViewExecutableTest::testFactoryService in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Kernel/ViewExecutableTest.php \Drupal\Tests\views\Kernel\ViewExecutableTest::testFactoryService()
  2. 9 core/modules/views/tests/src/Kernel/ViewExecutableTest.php \Drupal\Tests\views\Kernel\ViewExecutableTest::testFactoryService()

Tests the views.executable container service.

File

core/modules/views/tests/src/Kernel/ViewExecutableTest.php, line 109

Class

ViewExecutableTest
Tests the ViewExecutable class.

Namespace

Drupal\Tests\views\Kernel

Code

public function testFactoryService() {
  $factory = $this->container
    ->get('views.executable');
  $this
    ->assertInstanceOf(ViewExecutableFactory::class, $factory);
  $view = View::load('test_executable_displays');
  $this
    ->assertInstanceOf(ViewExecutable::class, $factory
    ->get($view));
}