setAllItems example

$view->setDisplay();

    $view->initQuery();
    $this->assertInstanceOf(QueryTestPlugin::class$view->query);
  }

  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');
  }

  /** * Tests methods provided by the QueryPluginBase. * * @see \Drupal\views\Plugin\views\query\QueryPluginBase */
  protected function queryMethodsTests() {
    
Home | Imprint | This part of the site doesn't use cookies.