xref: /PHP-8.2/ext/phar/tests/zip/notphar.phpt (revision 74859783)
1--TEST--
2Phar: a non-executable zip with no stub named .phar.zip
3--EXTENSIONS--
4phar
5--INI--
6phar.readonly=1
7detect_unicode=0
8zend.multibyte=0
9--FILE--
10<?php
11$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip';
12$pname = 'phar://' . $fname;
13
14copy(__DIR__ . '/files/zip.zip', $fname);
15include $fname;
16?>
17===DONE===
18--CLEAN--
19<?php
20unlink(__DIR__ . '/' . 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