Annotation of embedaddon/php/ext/zip/tests/bug53603.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #53603 (ZipArchive should quiet stat errors)
3: --SKIPIF--
4: <?php
5: if(!extension_loaded('zip')) die('skip');
6: ?>
7: --FILE--
8: <?php
9:
10: class TestStream {
11: function url_stat($path, $flags) {
12: if (!($flags & STREAM_URL_STAT_QUIET))
13: trigger_error("not quiet");
14: return array();
15: }
16: }
17:
18: stream_wrapper_register("teststream", "TestStream");
19:
20: $dirname = dirname(__FILE__) . '/';
21: $file = $dirname . 'test_with_comment.zip';
22: $zip = new ZipArchive;
23: if ($zip->open($file) !== TRUE) {
24: echo "open failed.\n";
25: exit('failed');
26: }
27:
28: $a = $zip->extractTo('teststream://test');
29: var_dump($a);
30:
31: --EXPECTF--
32:
33: Warning: ZipArchive::extractTo(teststream://test/foo): failed to open stream: "TestStream::stream_open" call failed in %s on line %d
34: bool(false)
35:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>