Package: php-horde-compress / 2.2.1-4

tests_dont_rely_on_directory_order.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: don't rely on directory order
Author: Remi Collet <remi@remirepo.net>
Origin: upstream, https://github.com/horde/Compress/commit/795f908809c4181b7d267bc9df3682e3b4ed45d0.patch
Last-Update: 2018-02-02

--- php-horde-compress-2.2.1.orig/Horde_Compress-2.2.1/test/Horde/Compress/TarTest.php
+++ php-horde-compress-2.2.1/Horde_Compress-2.2.1/test/Horde/Compress/TarTest.php
@@ -111,6 +111,9 @@ class Horde_Compress_TarTest extends Hor
         $this->assertNotEmpty($tar_data);
 
         $list = $compress->decompress($tar_data);
+        usort($list, function ($a, $b) {
+            return strcmp($a['name'], $b['name']);
+        });
         $this->assertCount(3, $list);
         $this->assertEquals('one.txt', $list[0]['name']);
         $this->assertEquals(4, $list[0]['size']);
--- php-horde-compress-2.2.1.orig/Horde_Compress-2.2.1/test/Horde/Compress/ZipTest.php
+++ php-horde-compress-2.2.1/Horde_Compress-2.2.1/test/Horde/Compress/ZipTest.php
@@ -142,6 +142,9 @@ class Horde_Compress_ZipTest extends Hor
         $list = $compress->decompress(
             $zip_data, array('action' => Horde_Compress_Zip::ZIP_LIST)
         );
+        usort($list, function ($a, $b) {
+           return strcmp($a['name'], $b['name']);
+        });
         $this->assertCount(3, $list);
         $this->assertEquals('one.txt', $list[0]['name']);
         $this->assertEquals(4, $list[0]['size']);