Skip to content
Snippets Groups Projects
Commit 11cbc6ab authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #c960657: rollback of double commit. It blame the network at Do It With Drupal. ;-)

parent 9b74fbaa
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -1908,34 +1908,6 @@ class DatabaseSelectComplexTestCase extends DatabaseTestCase {
$this->assertEqual($count, 4, t('Counted the correct number of records.'));
}
/**
* Test that countQuery properly removes 'all_fields' statements and
* ordering clauses.
*/
function testCountQueryRemovals() {
$query = db_select('test');
$query->fields('test');
$query->orderBy('name');
$count = $query->countQuery();
// Check that the 'all_fields' statement is handled properly.
$tables = $query->getTables();
$this->assertEqual($tables['test']['all_fields'], 1, t('Query correctly sets \'all_fields\' statement.'));
$tables = $count->getTables();
$this->assertFalse(isset($tables['test']['all_fields']), t('Count query correctly unsets \'all_fields\' statement.'));
// Check that the ordering clause is handled properly.
$orderby = $query->getOrderBy();
$this->assertEqual($orderby['name'], 'ASC', t('Query correctly sets ordering clause.'));
$orderby = $count->getOrderBy();
$this->assertFalse(isset($orderby['name']), t('Count query correctly unsets ordering caluse.'));
// Make sure that the count query works.
$count = $count->execute()->fetchField();
$this->assertEqual($count, 4, t('Counted the correct number of records.'));
}
/**
* Confirm that we can properly nest conditional clauses.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment