diff options
Diffstat (limited to 'ext/zip')
-rw-r--r-- | ext/zip/tests/oo_addpattern.phpt | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/ext/zip/tests/oo_addpattern.phpt b/ext/zip/tests/oo_addpattern.phpt index 73806d5a56..193f828496 100644 --- a/ext/zip/tests/oo_addpattern.phpt +++ b/ext/zip/tests/oo_addpattern.phpt @@ -10,11 +10,13 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; -include $dirname . 'utils.inc'; -$file = $dirname . '__tmp_oo_addpattern.zip'; +include __DIR__ . '/utils.inc'; -copy($dirname . 'test.zip', $file); +$dirname = __DIR__ . '/oo_addpattern_dir/'; +$file = $dirname . 'tmp.zip'; + +@mkdir($dirname); +copy(__DIR__ . '/test.zip', $file); touch($dirname . 'foo.txt'); touch($dirname . 'bar.txt'); @@ -36,10 +38,11 @@ if ($zip->status == ZIPARCHIVE::ER_OK) { ?> --CLEAN-- <?php -$dirname = dirname(__FILE__) . '/'; -unlink($dirname . '__tmp_oo_addpattern.zip'); +$dirname = dirname(__FILE__) . '/oo_addpattern_dir/'; +unlink($dirname . 'tmp.zip'); unlink($dirname . 'foo.txt'); unlink($dirname . 'bar.txt'); +rmdir($dirname); ?> --EXPECT-- 0 bar |