Keep sorting keys compatible: Moved array_values call to PHPUnit.

This commit partially reverts adcd258ea2.
This commit is contained in:
Christian Bläul
2018-02-11 09:44:43 +01:00
committed by Fonata
parent 5ced1f4212
commit 913dc94e2c
2 changed files with 1 additions and 4 deletions

View File

@@ -730,9 +730,6 @@ class parseCSV {
$this->sort_reverse ? krsort($rows, $sort_type) : ksort($rows, $sort_type);
// Avoid issues with mixing string and integer keys:
$rows = array_values($rows);
if ($this->offset !== null || $this->limit !== null) {
$rows = array_slice($rows, ($this->offset === null ? 0 : $this->offset), $this->limit, true);
}

View File

@@ -26,6 +26,6 @@ class BaseClass extends PHPUnit\Framework\TestCase {
$actual = array_map(function ($row) {
return $row['title'];
}, $this->csv->data);
$this->assertEquals($expected, $actual);
$this->assertEquals($expected, array_values($actual));
}
}