Skip to content
Snippets Groups Projects
Verified Commit 8c27634a authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2795919 by daffie, rpayanm: Change SelectComplexTest::testDistinct to...

Issue #2795919 by daffie, rpayanm: Change SelectComplexTest::testDistinct to test the distinct values not the count

(cherry picked from commit 4df74826)
parent 463dbb6b
Branches
Tags
5 merge requests!8506Draft: Issue #3456536 by ibrahim tameme,!5646Issue #3350972 by nod_: [random test failure]...,!5600Issue #3350972 by nod_: [random test failure]...,!5343Issue #3305066 by quietone, Rename RedirectLeadingSlashesSubscriber,!3603#ISSUE 3346218 Add a different message on edit comment
......@@ -184,10 +184,12 @@ public function testRangeUndo() {
public function testDistinct() {
$query = $this->connection->select('test_task');
$query->addField('test_task', 'task');
$query->orderBy('task');
$query->distinct();
$query_result = $query->countQuery()->execute()->fetchField();
$query_result = $query->execute()->fetchAll(\PDO::FETCH_COLUMN);
$this->assertEquals(6, $query_result, 'Returned the correct number of rows.');
$expected_result = ['code', 'eat', 'found new band', 'perform at superbowl', 'sing', 'sleep'];
$this->assertEquals($query_result, $expected_result, 'Returned the correct result.');
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment