function QueryTest::_testInitQuery

Same name and namespace in other branches
  1. 11.x core/modules/views/tests/src/Kernel/Plugin/QueryTest.php \Drupal\Tests\views\Kernel\Plugin\QueryTest::_testInitQuery()

Tests the ViewExecutable::initQuery method.

File

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

Class

QueryTest
Tests query plugins.

Namespace

Drupal\Tests\views\Kernel\Plugin

Code

public function _testInitQuery() {
  $view = Views::getView('test_view');
  $view->setDisplay();
  $view->initQuery();
  $this->assertInstanceOf(QueryTestPlugin::class, $view->query);
}

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