summaryrefslogtreecommitdiff
path: root/ext/zip/tests/oo_addglob.phpt
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2019-06-12 09:47:47 +0200
committerJoe Watkins <krakjoe@php.net>2019-06-12 09:47:47 +0200
commite2eb1ee1e3c4bc66f81bde2c5e26dd12f549efb2 (patch)
tree0c78be1b5571b4f8f5acb8bd1857e478d8620264 /ext/zip/tests/oo_addglob.phpt
parent66bd7875f85fb74695ec9fa98bba88d114580b9f (diff)
downloadphp-git-e2eb1ee1e3c4bc66f81bde2c5e26dd12f549efb2.tar.gz
fix flaky zip tests, order is OS dependent
Diffstat (limited to 'ext/zip/tests/oo_addglob.phpt')
-rw-r--r--ext/zip/tests/oo_addglob.phpt22
1 files changed, 14 insertions, 8 deletions
diff --git a/ext/zip/tests/oo_addglob.phpt b/ext/zip/tests/oo_addglob.phpt
index 0699797a5d..b20d4ab07a 100644
--- a/ext/zip/tests/oo_addglob.phpt
+++ b/ext/zip/tests/oo_addglob.phpt
@@ -29,10 +29,21 @@ if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) {
echo "failed1\n";
}
if ($zip->status == ZIPARCHIVE::ER_OK) {
- dump_entries_name($zip);
+ if (!verify_entries($zip, [
+ "bar",
+ "foobar/",
+ "foobar/baz",
+ "entry1.txt",
+ "baz/foo.txt",
+ "baz/bar.baz"
+ ])) {
+ echo "failed\n";
+ } else {
+ echo "OK";
+ }
$zip->close();
} else {
- echo "failed2\n";
+ echo "failed3\n";
}
?>
--CLEAN--
@@ -44,9 +55,4 @@ unlink($dirname . 'bar.baz');
rmdir($dirname);
?>
--EXPECT--
-0 bar
-1 foobar/
-2 foobar/baz
-3 entry1.txt
-4 baz/foo.txt
-5 baz/bar.baz
+OK