You are here

public function QueryTest::_testQueryExecute in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Kernel/Plugin/QueryTest.php \Drupal\Tests\views\Kernel\Plugin\QueryTest::_testQueryExecute()
1 call to QueryTest::_testQueryExecute()
QueryTest::testQuery in core/modules/views/tests/src/Kernel/Plugin/QueryTest.php
Tests query plugins.

File

core/modules/views/tests/src/Kernel/Plugin/QueryTest.php, line 50

Class

QueryTest
Tests query plugins.

Namespace

Drupal\Tests\views\Kernel\Plugin

Code

public function _testQueryExecute() {
  $view = Views::getView('test_view');
  $view
    ->setDisplay();
  $view
    ->initQuery();
  $view->query
    ->setAllItems($this
    ->dataSet());
  $this
    ->executeView($view);
  $this
    ->assertNotEmpty($view->result, 'Make sure the view result got filled');
}