function ViewsKernelTestBase::executeView

Same name and namespace in other branches
  1. 11.x core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php \Drupal\Tests\views\Kernel\ViewsKernelTestBase::executeView()
  2. 9 core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php \Drupal\Tests\views\Kernel\ViewsKernelTestBase::executeView()

Executes a view.

Parameters

\Drupal\views\ViewExecutable $view: The view object.

array $args: (optional) An array of the view arguments to use for the view.

24 calls to ViewsKernelTestBase::executeView()
ArgumentLanguageTest::testArgument in core/modules/language/tests/src/Kernel/Views/ArgumentLanguageTest.php
Tests the language argument.
ArgumentNodeRevisionIdTest::testNodeRevisionRelationship in core/modules/node/tests/src/Kernel/Views/ArgumentNodeRevisionIdTest.php
Tests the node revision id argument via the node_vid handler.
ArgumentUidRevisionTest::testArgument in core/modules/node/tests/src/Kernel/Views/ArgumentUidRevisionTest.php
Tests the node_uid_revision argument.
EntityReferenceRelationshipTest::testDataTableRelationship in core/modules/field/tests/src/Kernel/EntityReference/Views/EntityReferenceRelationshipTest.php
Tests views data generated for relationship.
EntityReferenceRelationshipTest::testDataTableRelationshipWithLongFieldName in core/modules/field/tests/src/Kernel/EntityReference/Views/EntityReferenceRelationshipTest.php
Tests views data generated for relationship.

... See full list

File

core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php, line 124

Class

ViewsKernelTestBase
Defines a base class for Views kernel testing.

Namespace

Drupal\Tests\views\Kernel

Code

protected function executeView($view, array $args = []) {
  $view->setDisplay();
  $view->preExecute($args);
  $view->execute();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.