You are here

public function ViewsModerationStateFilterTest::loadViewUnchanged in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php \Drupal\Tests\content_moderation\Functional\ViewsModerationStateFilterTest::loadViewUnchanged()

Load a view from the database after it has been modified in a sub-request.

Parameters

string $view_id: The view ID.

Return value

\Drupal\views\ViewEntityInterface A loaded view, bypassing static caches.

2 calls to ViewsModerationStateFilterTest::loadViewUnchanged()
ViewsModerationStateFilterTest::testModerationStateFilterDependencyHandling in core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php
Tests the dependency handling of the moderation state filter.
ViewsModerationStateFilterTest::testWorkflowChanges in core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php
Tests the moderation state filter when the configured workflow is changed.

File

core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php, line 154

Class

ViewsModerationStateFilterTest
Tests the views 'moderation_state_filter' filter plugin.

Namespace

Drupal\Tests\content_moderation\Functional

Code

public function loadViewUnchanged($view_id) {
  $this->container
    ->get('cache.config')
    ->deleteAll();
  $this->container
    ->get('config.factory')
    ->reset();
  return $this->container
    ->get('entity_type.manager')
    ->getStorage('view')
    ->loadUnchanged($view_id);
}