Loading core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php +4 −2 Original line number Diff line number Diff line Loading @@ -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.'); } /** Loading Loading
core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php +4 −2 Original line number Diff line number Diff line Loading @@ -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.'); } /** Loading