diff --git a/tests/Common/Tests/Adapter/Zip/AbstractZipAdapterTest.php b/tests/Common/Tests/Adapter/Zip/AbstractZipAdapterTest.php index c95eae7..882c4ce 100644 --- a/tests/Common/Tests/Adapter/Zip/AbstractZipAdapterTest.php +++ b/tests/Common/Tests/Adapter/Zip/AbstractZipAdapterTest.php @@ -3,6 +3,8 @@ namespace Common\Tests\Adapter\Zip; use PhpOffice\Common\Tests\TestHelperZip; +use PHPUnit\Framework\Error\Notice; +use PHPUnit\Framework\Error\Warning; abstract class AbstractZipAdapterTest extends \PHPUnit\Framework\TestCase { @@ -47,6 +49,13 @@ public function testClose() public function testAddFromString() { + // pclzip/pclzip library is not compatible with PHP 7.1+, issue: https://github.com/ivanlanin/pclzip/pull/8 + if (\PHP_VERSION_ID >= 80000) { + $this->expectException(get_class(new Warning())); + } else if (\PHP_VERSION_ID >= 71000) { + $this->expectException(get_class(new Notice())); + } + $expectedPath = 'file.test'; $expectedContent = 'Content';