1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Files
archived-php-src/ext/zip/tests/oo_setcompression_64bit.phpt

30 lines
628 B
PHP

--TEST--
setCompressionName and setCompressionIndex methods
--EXTENSIONS--
zip
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--FILE--
<?php
$zip = new ZipArchive;
try {
$zip->setCompressionName('entry5.txt', PHP_INT_MAX);
} catch (\ValueError $e) {
echo $e->getMessage(), PHP_EOL;
}
try {
$zip->setCompressionIndex(4, PHP_INT_MAX);
} catch (\ValueError $e) {
echo $e->getMessage(), PHP_EOL;
}
?>
--EXPECTF--
ZipArchive::setCompressionName(): Argument #2 ($method) must be between -1 and %d
ZipArchive::setCompressionIndex(): Argument #2 ($method) must be between -1 and %d