1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-08-11 01:34:36 +02:00

php8 support

This commit is contained in:
Ne-Lexa
2021-02-22 13:12:01 +03:00
parent 44c2041f62
commit a65fe4579b
118 changed files with 4060 additions and 6568 deletions

View File

@@ -1,5 +1,14 @@
<?php
declare(strict_types=1);
/*
* This file is part of the nelexa/zip package.
* (c) Ne-Lexa <https://github.com/Ne-Lexa/php-zip>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PhpZip\Tests\Extra\Fields;
use PHPUnit\Framework\TestCase;
@@ -15,7 +24,7 @@ use PhpZip\Model\Extra\Fields\UnrecognizedExtraField;
*/
final class UnrecognizedExtraFieldTest extends TestCase
{
public function testExtraField()
public function testExtraField(): void
{
$headerId = 0xF00D;
$binaryData = "\x01\x02\x03\x04\x05";
@@ -35,22 +44,18 @@ final class UnrecognizedExtraFieldTest extends TestCase
self::assertSame($unrecognizedExtraField->packCentralDirData(), $newBinaryData);
}
public function testUnpackLocalData()
public function testUnpackLocalData(): void
{
$this->expectException(
RuntimeException::class,
'Unsupport parse'
);
$this->expectException(RuntimeException::class);
$this->expectExceptionMessage('Unsupport parse');
UnrecognizedExtraField::unpackLocalFileData("\x01\x02");
}
public function testUnpackCentralDirData()
public function testUnpackCentralDirData(): void
{
$this->expectException(
RuntimeException::class,
'Unsupport parse'
);
$this->expectException(RuntimeException::class);
$this->expectExceptionMessage('Unsupport parse');
UnrecognizedExtraField::unpackCentralDirData("\x01\x02");
}