xref: /PHP-5.4/ext/phar/tests/zip/notphar.phpt (revision 228c2886)
1--TEST--
2Phar: a non-executable zip with no stub named .phar.zip
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5--INI--
6phar.readonly=1
7detect_unicode=0
8--FILE--
9<?php
10$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
11$pname = 'phar://' . $fname;
12
13copy(dirname(__FILE__) . '/files/zip.zip', $fname);
14include $fname;
15?>
16===DONE===
17--CLEAN--
18<?php
19unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
20__HALT_COMPILER();
21?>
22--EXPECTF--
23Warning: include(phar://%snotphar.phar.zip/.phar/stub.php): failed to open stream: '%snotphar.phar.zip' is not a phar archive. Use PharData::__construct() for a standard zip or tar archive in %snotphar.php on line %d
24PK%a
25