1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/phar/tests/bug46060.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

31 lines
755 B
PHP

--TEST--
Phar: Bug #46060: addEmptyDir() breaks
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (getenv('SKIP_SLOW_TESTS')) die('skip'); ?>
--INI--
phar.require_hash=0
--FILE--
<?php
$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar';
$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.tar';
$phar = new PharData($fname);
$phar->addEmptyDir('blah/');
$phar->addFromString('test/', '');
copy($fname, $fname2);
$phar = new PharData($fname2);
var_dump($phar['blah']->isDir(), $phar['test']->isDir());
?>
--CLEAN--
<?php
unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar');
unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.tar');
__HALT_COMPILER();
?>
--EXPECT--
bool(true)
bool(false)