You are here

public function QueryTest::_testInitQuery in Zircon Profile 8

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

Tests the ViewExecutable::initQuery method.

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

File

core/modules/views/src/Tests/Plugin/QueryTest.php, line 47
Contains \Drupal\views\Tests\Plugin\QueryTest.

Class

QueryTest
Tests query plugins.

Namespace

Drupal\views\Tests\Plugin

Code

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