function QueryTest::_testInitQuery

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

Tests the ViewExecutable::initQuery method.

1 call to QueryTest::_testInitQuery()
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 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.