protected function ViewsEntitySchemaSubscriberIntegrationTest::getUpdatedViewAndDisplay in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php \Drupal\Tests\views\Kernel\EventSubscriber\ViewsEntitySchemaSubscriberIntegrationTest::getUpdatedViewAndDisplay()
- 10 core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php \Drupal\Tests\views\Kernel\EventSubscriber\ViewsEntitySchemaSubscriberIntegrationTest::getUpdatedViewAndDisplay()
Gets a view and its display.
Parameters
bool $revision: (optional) TRUE if we want to get a revision view.
Return value
array An array with the view as first item, and the display as second.
2 calls to ViewsEntitySchemaSubscriberIntegrationTest::getUpdatedViewAndDisplay()
- ViewsEntitySchemaSubscriberIntegrationTest::testVariousTableUpdates in core/
modules/ views/ tests/ src/ Kernel/ EventSubscriber/ ViewsEntitySchemaSubscriberIntegrationTest.php - Tests a bunch possible entity definition table updates.
- ViewsEntitySchemaSubscriberIntegrationTest::testVariousTableUpdatesForRevisionView in core/
modules/ views/ tests/ src/ Kernel/ EventSubscriber/ ViewsEntitySchemaSubscriberIntegrationTest.php - Tests some possible entity table updates for a revision view.
File
- core/
modules/ views/ tests/ src/ Kernel/ EventSubscriber/ ViewsEntitySchemaSubscriberIntegrationTest.php, line 537
Class
- ViewsEntitySchemaSubscriberIntegrationTest
- Tests \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber
Namespace
Drupal\Tests\views\Kernel\EventSubscriberCode
protected function getUpdatedViewAndDisplay($revision = FALSE) {
$entity_storage = $this->entityTypeManager
->getStorage('view');
/** @var \Drupal\views\Entity\View $view */
$view = $entity_storage
->load($revision ? 'test_view_entity_test_revision' : 'test_view_entity_test');
$display = $view
->getDisplay('default');
return [
$view,
$display,
];
}