function DatabaseSelectPagerDefaultTestCase::testHavingPagerQuery
Confirm that a paging query with a having expression returns valid results.
This is a regression test for #467984.
Archivo
- drupal-7.x/
modules/ simpletest/ tests/ database_test.test, line 2415
Class
Código
function testHavingPagerQuery() {
$query = db_select('test', 't')->extend('PagerDefault');
$query->fields('t', array('name'))->orderBy('name')->groupBy('name')->having('MAX(age) > :count', array(':count' => 26))->limit(5);
$ages = $query->execute()->fetchCol();
$this->assertEqual($ages, array('George', 'Ringo'), 'Pager query with having expression returned the correct ages.');
}