mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Keep sorting keys compatible: Moved array_values call to PHPUnit.
This commit partially reverts adcd258ea2.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user