public function QueryTest::_testInitQuery

Tests the ViewExecutable::initQuery method.

1 call to QueryTest::_testInitQuery()
QueryTest::testQuery in drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/QueryTest.php
Tests query plugins.

File

drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/QueryTest.php, line 51
Definition of Drupal\views\Tests\Plugin\QueryTest.

Class

QueryTest
Tests query plugins.

Namespace

Drupal\views\Tests\Plugin

Code

public function _testInitQuery() {
  $view = views_get_view('test_view');
  $view
    ->setDisplay();
  $view
    ->initQuery();
  $this
    ->assertTrue($view->query instanceof QueryTestPlugin, 'Make sure the right query plugin got instantiated.');
}