public function ResultTest::testQuery in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php \Drupal\Tests\views\Unit\Plugin\area\ResultTest::testQuery()
Tests the query method.
File
- core/
modules/ views/ tests/ src/ Unit/ Plugin/ area/ ResultTest.php, line 59 - Contains \Drupal\Tests\views\Unit\Plugin\area\ResultTest.
Class
- ResultTest
- @coversDefaultClass \Drupal\views\Plugin\views\area\Result @group views
Namespace
Drupal\Tests\views\Unit\Plugin\areaCode
public function testQuery() {
$this
->assertNull($this->view->get_total_rows);
// @total should set get_total_rows.
$this->resultHandler->options['content'] = '@total';
$this->resultHandler
->query();
$this
->assertTrue($this->view->get_total_rows);
// A different token should not.
$this->view->get_total_rows = NULL;
$this->resultHandler->options['content'] = '@current_page';
$this->resultHandler
->query();
$this
->assertNull($this->view->get_total_rows);
}