function QueryTest::_testQueryExecute

Same name in other branches
  1. 9 core/modules/views/tests/src/Kernel/Plugin/QueryTest.php \Drupal\Tests\views\Kernel\Plugin\QueryTest::_testQueryExecute()
  2. 10 core/modules/views/tests/src/Kernel/Plugin/QueryTest.php \Drupal\Tests\views\Kernel\Plugin\QueryTest::_testQueryExecute()
  3. 11.x 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');
}

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