1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 21:41:22 +02:00
Files
archived-php-src/ext/zip/tests/oo_getexternalattributesname_error.phpt
2021-07-12 20:42:36 +02:00

24 lines
507 B
PHP

--TEST--
ZipArchive::getExternalAttributesName() throws a ValueError when the $name param is empty
--EXTENSIONS--
zip
--FILE--
<?php
$zip = new ZipArchive();
$dirname = __DIR__ . '/';
$zip->open($dirname . "test.zip", ZIPARCHIVE::CREATE);
$a = ZipArchive::OPSYS_DEFAULT;
$b = ZipArchive::OPSYS_DEFAULT;
try {
$zip->getExternalAttributesName("", $a, $b);
} catch(ValueError $e) {
echo $e->getMessage();
}
?>
--EXPECT--
ZipArchive::getExternalAttributesName(): Argument #1 ($name) cannot be empty