Problem/Motivation
Drupal\KernelTests\Core\Database\SelectComplexTest has to tests that are exactly the same (testDistinct and testCountQueryDistinct).
The code for Drupal\KernelTests\Core\Database\SelectComplexTest::testDistinct:
$query = db_select('test_task');
$query->addField('test_task', 'task');
$query->distinct();
$query_result = $query->countQuery()->execute()->fetchField();
$this->assertEqual($query_result, 6, 'Returned the correct number of rows.');
The code for Drupal\KernelTests\Core\Database\SelectComplexTest::testCountQueryDistinct:
$query = db_select('test_task');
$query->addField('test_task', 'task');
$query->distinct();
$count = $query->countQuery()->execute()->fetchField();
$this->assertEqual($count, 6, 'Counted the correct number of records.');
Steps to reproduce
Proposed resolution
Lets change the code for Drupal\KernelTests\Core\Database\SelectComplexTest::testDistinct to:
$query = db_select('test_task');
$query->addField('test_task', 'task');
$query->distinct();
$query_result = $query->execute()->fetchAll(\PDO::FETCH_COLUMN);
$this->assertEqual(count($query_result), 6, 'Returned the correct number of rows.');
$correct_result = ['eat', 'sleep', 'code', 'sing', 'found new band', 'perform at superbowl'];
$this->assertEqual($query_result, $correct_result, 'Returned the correct number of rows.');
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet