xref: /PHP-7.2/ext/phar/tests/bug71625.phpt (revision 17ccbeec)
1--TEST--
2Phar - Bug #71625 - Crash in php7.dll
3--INI--
4phar.readonly=0
5--SKIPIF--
6<?php
7
8if (!extension_loaded("phar") || !extension_loaded("zlib")) die("skip");
9if(substr(PHP_OS, 0, 3) != 'WIN' ) {
10    die('skip windows only test');
11}
12
13?>
14--FILE--
15<?php
16$phar = new Phar("A:A:.phar");
17$phar["hello_habr.txt"] = '<? Hello Habr!?>';
18?>
19DONE
20--EXPECTF--
21Fatal error: Uncaught UnexpectedValueException: Cannot create phar 'A:A:.phar', file extension (or combination) not recognised or the directory does not exist in %sbug71625.php:%d
22Stack trace:
23#0 %sbug71625.php(%d): Phar->__construct('A:A:.phar')
24#1 {main}
25  thrown in %sbug71625.php on line %d
26