You are here

protected function ViewsEntitySchemaSubscriberIntegrationTest::getUpdatedViewAndDisplay in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Tests/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php \Drupal\views\Tests\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/src/Tests/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
Tests a bunch possible entity definition table updates.
ViewsEntitySchemaSubscriberIntegrationTest::testVariousTableUpdatesForRevisionView in core/modules/views/src/Tests/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
Tests some possible entity table updates for a revision view.

File

core/modules/views/src/Tests/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php, line 457
Contains \Drupal\views\Tests\EventSubscriber\ViewsEntitySchemaSubscriberIntegrationTest.

Class

ViewsEntitySchemaSubscriberIntegrationTest
Tests \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber

Namespace

Drupal\views\Tests\EventSubscriber

Code

protected function getUpdatedViewAndDisplay($revision = FALSE) {
  $entity_storage = $this->entityManager
    ->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,
  ];
}