protected function ViewsCacheInvalidationTest::getView in Search API 8
Returns the test view.
Return value
\Drupal\views\ViewExecutable The view.
2 calls to ViewsCacheInvalidationTest::getView()
- ViewsCacheInvalidationTest::doAssertCached in tests/
src/ Kernel/ Views/ ViewsCacheInvalidationTest.php - Checks the cache status of the view for the given user.
- ViewsCacheInvalidationTest::testQueryCacheInvalidation in tests/
src/ Kernel/ Views/ ViewsCacheInvalidationTest.php - Tests that a cached views query result is invalidated at the right moments.
File
- tests/
src/ Kernel/ Views/ ViewsCacheInvalidationTest.php, line 445
Class
- ViewsCacheInvalidationTest
- Tests that cached Search API views get invalidated at the right occasions.
Namespace
Drupal\Tests\search_api\Kernel\ViewsCode
protected function getView() {
/** @var \Drupal\views\ViewEntityInterface $view */
$view = $this->entityTypeManager
->getStorage('view')
->load(self::TEST_VIEW_ID);
$executable = $this->viewExecutableFactory
->get($view);
$executable
->setDisplay(self::TEST_VIEW_DISPLAY_ID);
return $executable;
}