From 7e84f97473ae1d1e297710d7146b122893ce15c3 Mon Sep 17 00:00:00 2001 From: Ne-Lexa Date: Thu, 11 Oct 2018 10:49:53 +0300 Subject: [PATCH] resolve merge conflict --- src/PhpZip/ZipFile.php | 2 +- tests/PhpZip/ZipFileTest.php | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/PhpZip/ZipFile.php b/src/PhpZip/ZipFile.php index bc81b78..68dcc2f 100644 --- a/src/PhpZip/ZipFile.php +++ b/src/PhpZip/ZipFile.php @@ -92,7 +92,7 @@ class ZipFile implements ZipFileInterface public function openFile($filename) { if (!file_exists($filename)) { - throw new InvalidArgumentException("File $filename does not exist."); + throw new ZipException("File $filename does not exist."); } if (!($handle = @fopen($filename, 'rb'))) { throw new ZipException("File $filename can't open."); diff --git a/tests/PhpZip/ZipFileTest.php b/tests/PhpZip/ZipFileTest.php index a1eb639..96c291e 100644 --- a/tests/PhpZip/ZipFileTest.php +++ b/tests/PhpZip/ZipFileTest.php @@ -606,7 +606,7 @@ class ZipFileTest extends ZipTestCase /** * @expectedException \PhpZip\Exception\InvalidArgumentException - * @expectedExceptionMessage Glob pattern is empty + * @expectedExceptionMessage The glob pattern is not specified */ public function testDeleteFromGlobFailNull() { @@ -616,7 +616,7 @@ class ZipFileTest extends ZipTestCase /** * @expectedException \PhpZip\Exception\InvalidArgumentException - * @expectedExceptionMessage Glob pattern is empty + * @expectedExceptionMessage The glob pattern is not specified */ public function testDeleteFromGlobFailEmpty() { @@ -657,7 +657,7 @@ class ZipFileTest extends ZipTestCase /** * @expectedException \PhpZip\Exception\InvalidArgumentException - * @expectedExceptionMessage Regex pattern is empty. + * @expectedExceptionMessage The regex pattern is not specified */ public function testDeleteFromRegexFailNull() { @@ -667,7 +667,7 @@ class ZipFileTest extends ZipTestCase /** * @expectedException \PhpZip\Exception\InvalidArgumentException - * @expectedExceptionMessage Regex pattern is empty. + * @expectedExceptionMessage The regex pattern is not specified */ public function testDeleteFromRegexFailEmpty() { @@ -1292,7 +1292,7 @@ class ZipFileTest extends ZipTestCase /** * @expectedException \PhpZip\Exception\InvalidArgumentException - * @expectedExceptionMessage The input directory is not specified + * @expectedExceptionMessage Input dir is null * @throws ZipException */ public function testAddDirNullDirname() @@ -1313,7 +1313,7 @@ class ZipFileTest extends ZipTestCase } /** - * @expectedException \PhpZip\Exception\ZipException + * @expectedException \PhpZip\Exception\InvalidArgumentException * @expectedExceptionMessage does not exist * @throws ZipException */ @@ -1325,7 +1325,7 @@ class ZipFileTest extends ZipTestCase /** * @expectedException \PhpZip\Exception\InvalidArgumentException - * @expectedExceptionMessage The input directory is not specified + * @expectedExceptionMessage Input dir is null * @throws ZipException */ public function testAddDirRecursiveNullDirname() @@ -1358,7 +1358,7 @@ class ZipFileTest extends ZipTestCase /** * @expectedException \PhpZip\Exception\InvalidArgumentException - * @expectedExceptionMessage The input directory is not specified + * @expectedExceptionMessage Input dir is null * @throws ZipException */ public function testAddFilesFromGlobNull() @@ -1413,7 +1413,7 @@ class ZipFileTest extends ZipTestCase /** * @expectedException \PhpZip\Exception\InvalidArgumentException - * @expectedExceptionMessage The input directory is not specified + * @expectedExceptionMessage Input dir is null * @throws ZipException */ public function testAddFilesFromGlobRecursiveNull() @@ -1544,7 +1544,7 @@ class ZipFileTest extends ZipTestCase } /** - * @expectedException \PhpZip\Exception\ZipException + * @expectedException \PhpZip\Exception\InvalidArgumentException * @expectedExceptionMessage does not exist * @throws ZipException */