mirror of
https://github.com/Ne-Lexa/php-zip.git
synced 2025-08-11 01:34:36 +02:00
Add PHP 8 support
This commit is contained in:
@@ -76,7 +76,7 @@ abstract class AbstractUnicodeExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testUnicodeErrorParse()
|
||||
{
|
||||
$this->setExpectedException(
|
||||
$this->expectException(
|
||||
ZipException::class,
|
||||
'Unicode path extra data must have at least 5 bytes.'
|
||||
);
|
||||
@@ -90,7 +90,7 @@ abstract class AbstractUnicodeExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testUnknownVersionParse()
|
||||
{
|
||||
$this->setExpectedException(
|
||||
$this->expectException(
|
||||
ZipException::class,
|
||||
'Unsupported version [2] for Unicode path extra data.'
|
||||
);
|
||||
|
@@ -96,7 +96,8 @@ final class ApkAlignmentExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testInvalidParse()
|
||||
{
|
||||
$this->setExpectedException(
|
||||
//$this->expectException(
|
||||
$this->expectException(
|
||||
ZipException::class,
|
||||
'Minimum 6 bytes of the extensible data block/field used for alignment of uncompressed entries.'
|
||||
);
|
||||
|
@@ -91,7 +91,7 @@ final class AsiExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testInvalidParse()
|
||||
{
|
||||
$this->setExpectedException(
|
||||
$this->expectException(
|
||||
Crc32Exception::class,
|
||||
'Asi Unix Extra Filed Data (expected CRC32 value'
|
||||
);
|
||||
|
@@ -32,7 +32,7 @@ final class JarMarkerExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testInvalidUnpackLocalData()
|
||||
{
|
||||
$this->setExpectedException(
|
||||
$this->expectException(
|
||||
ZipException::class,
|
||||
"JarMarker doesn't expect any data"
|
||||
);
|
||||
@@ -45,7 +45,7 @@ final class JarMarkerExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testInvalidUnpackCdData()
|
||||
{
|
||||
$this->setExpectedException(
|
||||
$this->expectException(
|
||||
ZipException::class,
|
||||
"JarMarker doesn't expect any data"
|
||||
);
|
||||
|
@@ -14,7 +14,7 @@ use PhpZip\Model\Extra\Fields\NtfsExtraField;
|
||||
*/
|
||||
final class NtfsExtraFieldTest extends TestCase
|
||||
{
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
if (\PHP_INT_SIZE === 4) {
|
||||
self::markTestSkipped('only 64 bit test');
|
||||
|
@@ -37,7 +37,7 @@ final class UnrecognizedExtraFieldTest extends TestCase
|
||||
|
||||
public function testUnpackLocalData()
|
||||
{
|
||||
$this->setExpectedException(
|
||||
$this->expectException(
|
||||
RuntimeException::class,
|
||||
'Unsupport parse'
|
||||
);
|
||||
@@ -47,7 +47,7 @@ final class UnrecognizedExtraFieldTest extends TestCase
|
||||
|
||||
public function testUnpackCentralDirData()
|
||||
{
|
||||
$this->setExpectedException(
|
||||
$this->expectException(
|
||||
RuntimeException::class,
|
||||
'Unsupport parse'
|
||||
);
|
||||
|
@@ -157,7 +157,7 @@ final class WinZipAesExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testConstructUnsupportVendorVersion()
|
||||
{
|
||||
$this->setExpectedException(InvalidArgumentException::class, 'Unsupport WinZip AES vendor version: 3');
|
||||
$this->expectException(InvalidArgumentException::class, 'Unsupport WinZip AES vendor version: 3');
|
||||
|
||||
new WinZipAesExtraField(
|
||||
3,
|
||||
@@ -171,7 +171,7 @@ final class WinZipAesExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testSetterUnsupportVendorVersion()
|
||||
{
|
||||
$this->setExpectedException(InvalidArgumentException::class, 'Unsupport WinZip AES vendor version: 3');
|
||||
$this->expectException(InvalidArgumentException::class, 'Unsupport WinZip AES vendor version: 3');
|
||||
|
||||
$extraField = new WinZipAesExtraField(
|
||||
WinZipAesExtraField::VERSION_AE1,
|
||||
@@ -186,7 +186,7 @@ final class WinZipAesExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testConstructUnsupportCompressionMethod()
|
||||
{
|
||||
$this->setExpectedException(ZipUnsupportMethodException::class, 'Compression method 3 (Reduced compression factor 2) is not supported.');
|
||||
$this->expectException(ZipUnsupportMethodException::class, 'Compression method 3 (Reduced compression factor 2) is not supported.');
|
||||
|
||||
new WinZipAesExtraField(
|
||||
WinZipAesExtraField::VERSION_AE1,
|
||||
@@ -200,7 +200,7 @@ final class WinZipAesExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testSetterUnsupportCompressionMethod()
|
||||
{
|
||||
$this->setExpectedException(ZipUnsupportMethodException::class, 'Compression method 3 (Reduced compression factor 2) is not supported.');
|
||||
$this->expectException(ZipUnsupportMethodException::class, 'Compression method 3 (Reduced compression factor 2) is not supported.');
|
||||
|
||||
$extraField = new WinZipAesExtraField(
|
||||
WinZipAesExtraField::VERSION_AE1,
|
||||
@@ -215,7 +215,7 @@ final class WinZipAesExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testConstructUnsupportKeyStrength()
|
||||
{
|
||||
$this->setExpectedException(InvalidArgumentException::class, 'Key strength 16 not support value. Allow values: 1, 2, 3');
|
||||
$this->expectException(InvalidArgumentException::class, 'Key strength 16 not support value. Allow values: 1, 2, 3');
|
||||
|
||||
new WinZipAesExtraField(
|
||||
WinZipAesExtraField::VERSION_AE1,
|
||||
@@ -229,7 +229,7 @@ final class WinZipAesExtraFieldTest extends TestCase
|
||||
*/
|
||||
public function testSetterUnsupportKeyStrength()
|
||||
{
|
||||
$this->setExpectedException(InvalidArgumentException::class, 'Key strength 16 not support value. Allow values: 1, 2, 3');
|
||||
$this->expectException(InvalidArgumentException::class, 'Key strength 16 not support value. Allow values: 1, 2, 3');
|
||||
|
||||
new WinZipAesExtraField(
|
||||
WinZipAesExtraField::VERSION_AE1,
|
||||
|
@@ -15,7 +15,7 @@ use PhpZip\Model\ZipEntry;
|
||||
*/
|
||||
final class Zip64ExtraFieldTest extends TestCase
|
||||
{
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
if (\PHP_INT_SIZE === 4) {
|
||||
self::markTestSkipped('only 64 bit test');
|
||||
|
Reference in New Issue
Block a user