php-src/ext/zip/tests/oo_addemptydir_error.phpt
Nikita Popov 7485978339
Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

32 lines
500 B
PHP

--TEST--
ziparchive::addEmptyDir error
--EXTENSIONS--
zip
--SKIPIF--
<?php
/* $Id$ */
?>
--FILE--
<?php
include __DIR__ . '/utils.inc';
$zip = new ZipArchive;
if (!$zip->open(__DIR__ . '/test.zip', ZipArchive::RDONLY)) {
exit('failed');
}
var_dump($zip->addEmptyDir('emptydir'));
if ($zip->status == ZipArchive::ER_RDONLY) {
echo "OK\n";
} else if ($zip->status == ZipArchive::ER_OK) {
dump_entries_name($zip);
} else {
echo "Lost\n";
}
$zip->close();
?>
--EXPECT--
bool(false)
OK