You are here

protected function ViewsCacheabilityMetadataExportTest::getView in Search API 8

Returns the test view.

Return value

\Drupal\views\ViewExecutable The view.

1 call to ViewsCacheabilityMetadataExportTest::getView()
ViewsCacheabilityMetadataExportTest::testViewExport in tests/src/Kernel/Views/ViewsCacheabilityMetadataExportTest.php
Tests that an exported view contains the right cacheability metadata.

File

tests/src/Kernel/Views/ViewsCacheabilityMetadataExportTest.php, line 240

Class

ViewsCacheabilityMetadataExportTest
Tests that cacheability metadata is included when Views config is exported.

Namespace

Drupal\Tests\search_api\Kernel\Views

Code

protected function getView() {

  /** @var \Drupal\views\ViewEntityInterface $view */
  $view = $this->entityTypeManager
    ->getStorage('view')
    ->load(self::TEST_VIEW_ID);
  $executable = $this->viewExecutableFactory
    ->get($view);
  return $executable;
}