xref: /PHP-7.2/ext/phar/tests/zip/notphar.phpt (revision 17ccbeec)
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
8zend.multibyte=0
9--FILE--
10<?php
11$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
12$pname = 'phar://' . $fname;
13
14copy(dirname(__FILE__) . '/files/zip.zip', $fname);
15include $fname;
16?>
17===DONE===
18--CLEAN--
19<?php
20unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
21__HALT_COMPILER();
22?>
23--EXPECTF--
24Warning: 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
25PK%a
26