function SelectComplexTest::testRangeUndo
Tests whether the range property of a select clause can be undone.
File
- 
              core/tests/ Drupal/ KernelTests/ Core/ Database/ SelectComplexTest.php, line 170 
Class
- SelectComplexTest
- Tests the Select query builder with more complex queries.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testRangeUndo() {
  $query = $this->connection
    ->select('test');
  $query->addField('test', 'name');
  $query->addField('test', 'age', 'age');
  $query->range(0, 2);
  $query->range(NULL, NULL);
  $query_result = $query->countQuery()
    ->execute()
    ->fetchField();
  $this->assertEquals(4, $query_result, 'Returned the correct number of rows.');
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
