From 4ded7331152f612640a966a5b9733058e4e7b2aa Mon Sep 17 00:00:00 2001 From: Shahar Evron Date: Tue, 21 Aug 2012 19:22:25 +0300 Subject: [PATCH 01/36] adding the urinormalize filter to the filter plugin manager --- src/FilterPluginManager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/FilterPluginManager.php b/src/FilterPluginManager.php index d7ea9b55..0f58a4e3 100644 --- a/src/FilterPluginManager.php +++ b/src/FilterPluginManager.php @@ -68,6 +68,7 @@ class FilterPluginManager extends AbstractPluginManager 'stringtrim' => 'Zend\Filter\StringTrim', 'stripnewlines' => 'Zend\Filter\StripNewlines', 'striptags' => 'Zend\Filter\StripTags', + 'urinormalize' => 'Zend\Filter\UriNormalize', 'wordcamelcasetodash' => 'Zend\Filter\Word\CamelCaseToDash', 'wordcamelcasetoseparator' => 'Zend\Filter\Word\CamelCaseToSeparator', 'wordcamelcasetounderscore' => 'Zend\Filter\Word\CamelCaseToUnderscore', From 7bcdf3d9a8dd52f7c830d35f072e27dda0b074d0 Mon Sep 17 00:00:00 2001 From: Shahar Evron Date: Tue, 21 Aug 2012 21:36:11 +0300 Subject: [PATCH 02/36] CS fixes --- src/UriNormalize.php | 36 ++++++++++++++++++++++++++---------- test/UriNormalizeTest.php | 18 ++++++++++++++++-- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/UriNormalize.php b/src/UriNormalize.php index a35bfe0a..082c37a8 100644 --- a/src/UriNormalize.php +++ b/src/UriNormalize.php @@ -1,13 +1,25 @@ setOptions($options); + if ($options) { + $this->setOptions($options); + } } /** @@ -81,13 +95,13 @@ public function filter($value) $defaultScheme = $this->defaultScheme ?: $this->enforcedScheme; // Reset default scheme if it is not a known scheme - if (! UriFactory::getRegisteredSchemeClass($defaultScheme)) { + if (!UriFactory::getRegisteredSchemeClass($defaultScheme)) { $defaultScheme = null; } try { $uri = UriFactory::factory($value, $defaultScheme); - if ($this->enforcedScheme && (! $uri->getScheme())) { + if ($this->enforcedScheme && (!$uri->getScheme())) { $this->enforceScheme($uri); } @@ -98,7 +112,7 @@ public function filter($value) $uri->normalize(); - if (! $uri->isValid()) { + if (!$uri->isValid()) { return $value; } @@ -125,7 +139,9 @@ protected function enforceScheme(Uri $uri) } // We have nothing to do if we have no host - if (! $host) return; + if (!$host) { + return; + } $uri->setScheme($this->enforcedScheme) ->setHost($host) diff --git a/test/UriNormalizeTest.php b/test/UriNormalizeTest.php index 8e3d02ed..f0d42e36 100644 --- a/test/UriNormalizeTest.php +++ b/test/UriNormalizeTest.php @@ -1,9 +1,23 @@ assertEquals($expected, $result); } - static public function abnormalUriProvider() + public static function abnormalUriProvider() { return array( array('http://www.example.com', 'http://www.example.com/'), @@ -43,7 +57,7 @@ static public function abnormalUriProvider() ); } - static public function enforcedSchemeTestcaseProvider() + public static function enforcedSchemeTestcaseProvider() { return array( array('ftp', 'http://www.example.com', 'http://www.example.com/'), // no effect - this one has a scheme From 97817f3b4f8f80b6b680255d56020d9dbc36622a Mon Sep 17 00:00:00 2001 From: Christopher Martin Date: Thu, 4 Oct 2012 00:29:40 -0400 Subject: [PATCH 03/36] Refactored Zend/File/Transfer/Adapter/Http upload progress methods into Zend/Progressbar/Upload/UploadHandlers --- test/File/RenameUploadTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/File/RenameUploadTest.php b/test/File/RenameUploadTest.php index 308ca922..421b126d 100644 --- a/test/File/RenameUploadTest.php +++ b/test/File/RenameUploadTest.php @@ -18,7 +18,7 @@ * @subpackage UnitTests * @group Zend_Filter */ -class RenameTest extends \PHPUnit_Framework_TestCase +class RenameUploadTest extends \PHPUnit_Framework_TestCase { /** * Path to test files From 775f2bc46e80cdfea80f1ad1eb046d8030e389b7 Mon Sep 17 00:00:00 2001 From: Maik Penz Date: Fri, 23 Nov 2012 23:35:23 +0100 Subject: [PATCH 04/36] added compresssnappy to FilterPluginManager --- src/FilterPluginManager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/FilterPluginManager.php b/src/FilterPluginManager.php index d7ea9b55..7f284d4d 100644 --- a/src/FilterPluginManager.php +++ b/src/FilterPluginManager.php @@ -40,6 +40,7 @@ class FilterPluginManager extends AbstractPluginManager 'compressgz' => 'Zend\Filter\Compress\Gz', 'compresslzf' => 'Zend\Filter\Compress\Lzf', 'compressrar' => 'Zend\Filter\Compress\Rar', + 'compresssnappy' => 'Zend\Filter\Compress\Snappy', 'compresstar' => 'Zend\Filter\Compress\Tar', 'compresszip' => 'Zend\Filter\Compress\Zip', 'decompress' => 'Zend\Filter\Decompress', From 7c2b91d3f924ad32a07afc70bbb1e25943042d36 Mon Sep 17 00:00:00 2001 From: Maik Penz Date: Fri, 23 Nov 2012 23:35:52 +0100 Subject: [PATCH 05/36] mock test --- test/Compress/SnappyTest.php | 62 ++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 test/Compress/SnappyTest.php diff --git a/test/Compress/SnappyTest.php b/test/Compress/SnappyTest.php new file mode 100644 index 00000000..71c6cd29 --- /dev/null +++ b/test/Compress/SnappyTest.php @@ -0,0 +1,62 @@ +markTestSkipped('This adapter needs the snappy extension'); + } + } + + /** + * Basic usage + * + * @return void + */ + public function testBasicUsage() + { + $filter = new SnappyCompression(); + + $content = $filter->compress('compress me'); + $this->assertNotEquals('compress me', $content); + + $content = $filter->decompress($content); + $this->assertEquals('compress me', $content); + } + + // TODO test all three warnings (on each method) + // TODO test exception + // TODO test recompression + // TODO test null/ false compression + // TODO test invalid argument cases + + /** + * testing toString + * + * @return void + */ + public function testSnappyToString() + { + $filter = new SnappyCompression(); + $this->assertEquals('Snappy', $filter->toString()); + } +} From bee7b9badf799d37ccf3d28264b01fc28364dc59 Mon Sep 17 00:00:00 2001 From: Maik Penz Date: Fri, 23 Nov 2012 23:38:37 +0100 Subject: [PATCH 06/36] fixed migration error: has no base class --- src/Compress/Snappy.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Compress/Snappy.php b/src/Compress/Snappy.php index 4b92464d..fbbb3612 100644 --- a/src/Compress/Snappy.php +++ b/src/Compress/Snappy.php @@ -32,7 +32,6 @@ public function __construct($options = null) if (!extension_loaded('snappy')) { throw new Exception\ExtensionNotLoadedException('This filter needs the snappy extension'); } - parent::__construct($options); } /** From b02e75a7d76c9e3dcdc1af4059caff63c898bea4 Mon Sep 17 00:00:00 2001 From: Maik Penz Date: Sat, 24 Nov 2012 00:07:03 +0100 Subject: [PATCH 07/36] unit test for Zend_Filter_Compress_Snappy, fixed code, enforced psr-2 --- src/Compress/Snappy.php | 2 +- test/Compress/SnappyTest.php | 64 +++++++++++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 6 deletions(-) diff --git a/src/Compress/Snappy.php b/src/Compress/Snappy.php index fbbb3612..b544b578 100644 --- a/src/Compress/Snappy.php +++ b/src/Compress/Snappy.php @@ -64,7 +64,7 @@ public function decompress($content) $compressed = snappy_uncompress($content); if ($compressed === false) { - throw new Exception\RuntimeException('Error while uncompressing.'); + throw new Exception\RuntimeException('Error while decompressing.'); } return $compressed; diff --git a/test/Compress/SnappyTest.php b/test/Compress/SnappyTest.php index 71c6cd29..0bb1f637 100644 --- a/test/Compress/SnappyTest.php +++ b/test/Compress/SnappyTest.php @@ -43,11 +43,58 @@ public function testBasicUsage() $this->assertEquals('compress me', $content); } - // TODO test all three warnings (on each method) - // TODO test exception - // TODO test recompression - // TODO test null/ false compression - // TODO test invalid argument cases + /** + * Snappy should return NULL on invalid arguments. + * + * @return void + */ + public function testNonScalarInput() + { + $filter = new SnappyCompression(); + + // restore_error_handler can emit an E_WARNING; let's ignore that, as + // we want to test the returned value + set_error_handler(array($this, 'errorHandler'), E_WARNING); + $content = $filter->compress(array()); + restore_error_handler(); + + $this->assertNull($content); + } + + /** + * Snappy should handle empty input data correctly. + * + * @return void + */ + public function testEmptyString() + { + $filter = new SnappyCompression(); + + $content = $filter->compress(false); + $content = $filter->decompress($content); + $this->assertEquals('', $content, 'Snappy failed to decompress empty string.'); + } + + /** + * Snappy should throw an exception when decompressing invalid data. + * + * @return void + */ + public function testInvalidData() + { + $filter = new SnappyCompression(); + + $this->setExpectedException( + 'Zend\Filter\Exception\RuntimeException', + 'Error while decompressing.' + ); + + // restore_error_handler can emit an E_WARNING; let's ignore that, as + // we want to test the returned value + set_error_handler(array($this, 'errorHandler'), E_WARNING); + $content = $filter->decompress('123'); + restore_error_handler(); + } /** * testing toString @@ -59,4 +106,11 @@ public function testSnappyToString() $filter = new SnappyCompression(); $this->assertEquals('Snappy', $filter->toString()); } + + /** + * Null error handler; used when wanting to ignore specific error types + */ + public function errorHandler($errno, $errstr) + { + } } From 95e42e4ea9b08e3bdb713e1999895c88c5dc835c Mon Sep 17 00:00:00 2001 From: Maik Penz Date: Sat, 24 Nov 2012 00:16:27 +0100 Subject: [PATCH 08/36] removed unneeded blank line --- src/Compress/Snappy.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Compress/Snappy.php b/src/Compress/Snappy.php index b544b578..6ef34ce8 100644 --- a/src/Compress/Snappy.php +++ b/src/Compress/Snappy.php @@ -10,7 +10,6 @@ namespace Zend\Filter\Compress; - use Zend\Filter\Exception; /** From 166a2cd5340c3631887c8987bde44110371f60c8 Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Tue, 18 Dec 2012 18:33:26 -0500 Subject: [PATCH 09/36] File Filter unit test coverage for FILES array --- test/File/DecryptTest.php | 32 ++++++++++++++++++++++++++++++++ test/File/EncryptTest.php | 27 +++++++++++++++++++++++++++ test/File/LowerCaseTest.php | 11 +++++++++++ test/File/RenameTest.php | 25 +++++++++++++++++++++++++ test/File/RenameUploadTest.php | 25 +++++++++++++++++++++++++ test/File/UpperCaseTest.php | 11 +++++++++++ 6 files changed, 131 insertions(+) diff --git a/test/File/DecryptTest.php b/test/File/DecryptTest.php index c9f5426d..14f687c6 100644 --- a/test/File/DecryptTest.php +++ b/test/File/DecryptTest.php @@ -80,6 +80,38 @@ public function testBasic() trim(file_get_contents(dirname(__DIR__).'/_files/newencryption.txt'))); } + /** + * @return void + */ + public function testBasicWithFileArray() + { + $filter = new FileEncrypt(); + $filter->setFilename(dirname(__DIR__).'/_files/newencryption.txt'); + + $this->assertEquals( + dirname(__DIR__).'/_files/newencryption.txt', + $filter->getFilename()); + + $filter->setVector('1234567890123456'); + $filter->filter(array('tmp_name' => dirname(__DIR__).'/_files/encryption.txt')); + + $filter = new FileDecrypt(); + + $this->assertNotEquals( + 'Encryption', + file_get_contents(dirname(__DIR__).'/_files/newencryption.txt')); + + $filter->setVector('1234567890123456'); + $this->assertEquals( + array('tmp_name' => dirname(__DIR__).'/_files/newencryption.txt'), + $filter->filter(array('tmp_name' => dirname(__DIR__).'/_files/newencryption.txt')) + ); + + $this->assertEquals( + 'Encryption', + trim(file_get_contents(dirname(__DIR__).'/_files/newencryption.txt'))); + } + public function testEncryptionWithDecryption() { $filter = new FileEncrypt(); diff --git a/test/File/EncryptTest.php b/test/File/EncryptTest.php index 9f6c04c5..40ede758 100644 --- a/test/File/EncryptTest.php +++ b/test/File/EncryptTest.php @@ -66,6 +66,33 @@ public function testBasic() file_get_contents(dirname(__DIR__).'/_files/newencryption.txt')); } + /** + * @return void + */ + public function testBasicWithFileArray() + { + $filter = new FileEncrypt(); + $filter->setFilename(dirname(__DIR__).'/_files/newencryption.txt'); + + $this->assertEquals( + dirname(__DIR__).'/_files/newencryption.txt', + $filter->getFilename()); + + $filter->setVector('1234567890123456'); + $this->assertEquals( + array('tmp_name' => dirname(__DIR__).'/_files/newencryption.txt'), + $filter->filter(array('tmp_name' => dirname(__DIR__).'/_files/encryption.txt')) + ); + + $this->assertEquals( + 'Encryption', + file_get_contents(dirname(__DIR__).'/_files/encryption.txt')); + + $this->assertNotEquals( + 'Encryption', + file_get_contents(dirname(__DIR__).'/_files/newencryption.txt')); + } + public function testEncryptionWithDecryption() { $filter = new FileEncrypt(); diff --git a/test/File/LowerCaseTest.php b/test/File/LowerCaseTest.php index 38f4a446..b514667a 100644 --- a/test/File/LowerCaseTest.php +++ b/test/File/LowerCaseTest.php @@ -80,6 +80,17 @@ public function testInstanceCreationAndNormalWorkflow() $this->assertContains('this is a file', file_get_contents($this->_newFile)); } + /** + * @return void + */ + public function testNormalWorkflowWithFilesArray() + { + $this->assertContains('This is a File', file_get_contents($this->_newFile)); + $filter = new FileLowerCase(); + $filter(array('tmp_name' => $this->_newFile)); + $this->assertContains('this is a file', file_get_contents($this->_newFile)); + } + /** * @return void */ diff --git a/test/File/RenameTest.php b/test/File/RenameTest.php index 1a6416e1..dde267ff 100644 --- a/test/File/RenameTest.php +++ b/test/File/RenameTest.php @@ -137,6 +137,31 @@ public function testConstructSingleValue() $this->assertEquals('falsefile', $filter('falsefile')); } + /** + * Test single parameter filter + * + * @return void + */ + public function testConstructSingleValueWithFilesArray() + { + $filter = new FileRename($this->_newFile); + + $this->assertEquals( + array(0 => array( + 'source' => '*', + 'target' => $this->_newFile, + 'overwrite' => false, + 'randomize' => false, + )), + $filter->getFile() + ); + $this->assertEquals( + array('tmp_name' => $this->_newFile), + $filter(array('tmp_name' => $this->_oldFile)) + ); + $this->assertEquals('falsefile', $filter('falsefile')); + } + /** * Test single array parameter filter * diff --git a/test/File/RenameUploadTest.php b/test/File/RenameUploadTest.php index 7cb090b9..bb9c4e26 100644 --- a/test/File/RenameUploadTest.php +++ b/test/File/RenameUploadTest.php @@ -190,6 +190,31 @@ public function testConstructSingleValue() $this->assertEquals('falsefile', $filter('falsefile')); } + /** + * @return void + */ + public function testConstructSingleValueWithFilesArray() + { + $this->setUpMockMoveUploadedFile(); + + $filter = new FileRenameUpload($this->_newFile); + + $this->assertEquals( + array(0 => array( + 'source' => '*', + 'target' => $this->_newFile, + 'overwrite' => false, + 'randomize' => false, + )), + $filter->getFile() + ); + $this->assertEquals( + array('tmp_name' => $this->_newFile), + $filter(array('tmp_name' => $this->_oldFile)) + ); + $this->assertEquals('falsefile', $filter('falsefile')); + } + /** * Test single array parameter filter * diff --git a/test/File/UpperCaseTest.php b/test/File/UpperCaseTest.php index a79ba922..972743ec 100644 --- a/test/File/UpperCaseTest.php +++ b/test/File/UpperCaseTest.php @@ -80,6 +80,17 @@ public function testInstanceCreationAndNormalWorkflow() $this->assertContains('THIS IS A FILE', file_get_contents($this->_newFile)); } + /** + * @return void + */ + public function testNormalWorkflowWithFilesArray() + { + $this->assertContains('This is a File', file_get_contents($this->_newFile)); + $filter = new FileUpperCase(); + $filter(array('tmp_name' => $this->_newFile)); + $this->assertContains('THIS IS A FILE', file_get_contents($this->_newFile)); + } + /** * @return void */ From d284b443698d965bf23962270ae70bdfaddca8fb Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Thu, 3 Jan 2013 15:15:42 -0500 Subject: [PATCH 10/36] Change RenameUpload filter use_upload_name option default to a safer setting --- src/File/RenameUpload.php | 6 ++---- test/File/RenameUploadTest.php | 19 ++++--------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/src/File/RenameUpload.php b/src/File/RenameUpload.php index 70ba8497..5c66e1ea 100644 --- a/src/File/RenameUpload.php +++ b/src/File/RenameUpload.php @@ -25,7 +25,7 @@ class RenameUpload extends AbstractFilter */ protected $options = array( 'target' => null, - 'use_upload_name' => true, + 'use_upload_name' => false, 'overwrite' => false, 'randomize' => false, ); @@ -42,8 +42,6 @@ public function __construct($targetOrOptions) } else { $this->setTarget($targetOrOptions); } - - } /** @@ -145,7 +143,7 @@ public function filter($value) } else { $uploadData = array( 'tmp_name' => $value, - 'name' => $value, + 'name' => $value, ); $sourceFile = $value; } diff --git a/test/File/RenameUploadTest.php b/test/File/RenameUploadTest.php index 56ab478e..7d116a3d 100644 --- a/test/File/RenameUploadTest.php +++ b/test/File/RenameUploadTest.php @@ -130,7 +130,6 @@ public function tearDown() public function testThrowsExceptionWithNonUploadedFile() { $filter = new FileRenameUpload($this->_newFile); - $filter->setUseUploadName(false); $this->assertEquals($this->_newFile, $filter->getTarget()); $this->assertEquals('falsefile', $filter('falsefile')); $this->setExpectedException( @@ -165,18 +164,18 @@ public function testOptions() { $filter = new FileRenameUpload($this->_newFile); $this->assertEquals($this->_newFile, $filter->getTarget()); - $this->assertTrue($filter->getUseUploadName()); + $this->assertFalse($filter->getUseUploadName()); $this->assertFalse($filter->getOverwrite()); $this->assertFalse($filter->getRandomize()); $filter = new FileRenameUpload(array( 'target' => $this->_oldFile, - 'use_upload_name' => false, + 'use_upload_name' => true, 'overwrite' => true, 'randomize' => true, )); $this->assertEquals($this->_oldFile, $filter->getTarget()); - $this->assertFalse($filter->getUseUploadName()); + $this->assertTrue($filter->getUseUploadName()); $this->assertTrue($filter->getOverwrite()); $this->assertTrue($filter->getRandomize()); } @@ -189,7 +188,6 @@ public function testStringConstructorParam() $this->setUpMockMoveUploadedFile(); $filter = new FileRenameUpload($this->_newFile); - $filter->setUseUploadName(false); $this->assertEquals($this->_newFile, $filter->getTarget()); $this->assertEquals($this->_newFile, $filter($this->_oldFile)); $this->assertEquals('falsefile', $filter('falsefile')); @@ -225,10 +223,7 @@ public function testArrayConstructorParam() $this->setUpMockMoveUploadedFile(); $filter = new FileRenameUpload(array( - 'target' => $this->_newFile, - 'use_upload_name' => false, - 'overwrite' => false, - 'randomize' => false, + 'target' => $this->_newFile, )); $this->assertEquals($this->_newFile, $filter->getTarget()); $this->assertEquals($this->_newFile, $filter($this->_oldFile)); @@ -241,7 +236,6 @@ public function testArrayConstructorParam() public function testConstructTruncatedTarget() { $filter = new FileRenameUpload('*'); - $filter->setUseUploadName(false); $this->assertEquals('*', $filter->getTarget()); $this->assertEquals($this->_oldFile, $filter($this->_oldFile)); $this->assertEquals('falsefile', $filter('falsefile')); @@ -255,7 +249,6 @@ public function testTargetDirectory() $this->setUpMockMoveUploadedFile(); $filter = new FileRenameUpload($this->_newDir); - $filter->setUseUploadName(false); $this->assertEquals($this->_newDir, $filter->getTarget()); $this->assertEquals($this->_newDirFile, $filter($this->_oldFile)); $this->assertEquals('falsefile', $filter('falsefile')); @@ -271,7 +264,6 @@ public function testOverwriteWithExistingFile() $filter = new FileRenameUpload(array( 'target' => $this->_newFile, 'overwrite' => true, - 'use_upload_name' => false, )); copy($this->_oldFile, $this->_newFile); @@ -290,7 +282,6 @@ public function testCannotOverwriteExistingFile() $filter = new FileRenameUpload(array( 'target' => $this->_newFile, 'overwrite' => false, - 'use_upload_name' => false, )); copy($this->_oldFile, $this->_newFile); @@ -313,7 +304,6 @@ public function testGetRandomizedFile() $filter = new FileRenameUpload(array( 'target' => $this->_newFile, 'randomize' => true, - 'use_upload_name' => false, )); $this->assertEquals($this->_newFile, $filter->getTarget()); @@ -333,7 +323,6 @@ public function testGetRandomizedFileWithoutExtension() $filter = new FileRenameUpload(array( 'target' => $fileNoExt, 'randomize' => true, - 'use_upload_name' => false, )); $this->assertEquals($fileNoExt, $filter->getTarget()); From 6d1824e9b7b361d174d810585061399a4231fbbb Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 5 Jan 2013 05:43:48 +0700 Subject: [PATCH 11/36] boolean to bool in docblock --- src/AbstractFilter.php | 2 +- src/Boolean.php | 4 ++-- src/Compress/Rar.php | 2 +- src/Encrypt/Openssl.php | 6 +++--- src/File/Rename.php | 2 +- src/HtmlEntities.php | 6 +++--- src/RealPath.php | 6 +++--- test/_files/TestNamespace/StringEquals.php | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/AbstractFilter.php b/src/AbstractFilter.php index d842e87a..f6b5be3f 100644 --- a/src/AbstractFilter.php +++ b/src/AbstractFilter.php @@ -29,7 +29,7 @@ abstract class AbstractFilter implements FilterInterface /** * Is PCRE is compiled with UTF-8 and Unicode support * - * @var boolean + * @var bool **/ protected static $hasPcreUnicodeSupport = null; diff --git a/src/Boolean.php b/src/Boolean.php index 0c788744..33b8954a 100644 --- a/src/Boolean.php +++ b/src/Boolean.php @@ -139,7 +139,7 @@ public function getType() /** * Set the working mode * - * @param boolean $flag When true this filter works like cast + * @param bool $flag When true this filter works like cast * When false it recognises only true and false * and all other values are returned as is * @return Boolean @@ -153,7 +153,7 @@ public function setCasting($flag = true) /** * Returns the casting option * - * @return boolean + * @return bool */ public function getCasting() { diff --git a/src/Compress/Rar.php b/src/Compress/Rar.php index 813a267a..5f9ca356 100644 --- a/src/Compress/Rar.php +++ b/src/Compress/Rar.php @@ -182,7 +182,7 @@ public function compress($content) * Decompresses the given content * * @param string $content - * @return boolean + * @return bool * @throws Exception\RuntimeException if archive not found, cannot be opened, * or error during decompression */ diff --git a/src/Encrypt/Openssl.php b/src/Encrypt/Openssl.php index 43a97c74..f22b784b 100644 --- a/src/Encrypt/Openssl.php +++ b/src/Encrypt/Openssl.php @@ -55,7 +55,7 @@ class Openssl implements EncryptionAlgorithmInterface /** * Internal create package * - * @var boolean + * @var bool */ protected $package = false; @@ -312,7 +312,7 @@ public function setCompression($compression) /** * Returns if header should be packaged * - * @return boolean + * @return bool */ public function getPackage() { @@ -322,7 +322,7 @@ public function getPackage() /** * Sets if the envelope keys should be included in the encrypted value * - * @param boolean $package + * @param bool $package * @return Openssl */ public function setPackage($package) diff --git a/src/File/Rename.php b/src/File/Rename.php index cef82e4f..e629dcb1 100644 --- a/src/File/Rename.php +++ b/src/File/Rename.php @@ -110,7 +110,7 @@ public function addFile($options) * But existing files will be erased when the overwrite option is true * * @param string $value Full path of file to change - * @param boolean $source Return internal informations + * @param bool $source Return internal informations * @return string The new filename which has been set * @throws Exception\InvalidArgumentException If the target file already exists. */ diff --git a/src/HtmlEntities.php b/src/HtmlEntities.php index 529b47d5..4aeac09b 100644 --- a/src/HtmlEntities.php +++ b/src/HtmlEntities.php @@ -36,7 +36,7 @@ class HtmlEntities extends AbstractFilter /** * Corresponds to the forth htmlentities() argument * - * @var boolean + * @var bool */ protected $doubleQuote; @@ -153,7 +153,7 @@ public function setCharSet($charSet) /** * Returns the doubleQuote option * - * @return boolean + * @return bool */ public function getDoubleQuote() { @@ -163,7 +163,7 @@ public function getDoubleQuote() /** * Sets the doubleQuote option * - * @param boolean $doubleQuote + * @param bool $doubleQuote * @return HtmlEntities Provides a fluent interface */ public function setDoubleQuote($doubleQuote) diff --git a/src/RealPath.php b/src/RealPath.php index cac159ef..5e52f286 100644 --- a/src/RealPath.php +++ b/src/RealPath.php @@ -29,7 +29,7 @@ class RealPath extends AbstractFilter /** * Class constructor * - * @param boolean|Traversable $existsOrOptions Options to set + * @param bool|Traversable $existsOrOptions Options to set */ public function __construct($existsOrOptions = true) { @@ -47,7 +47,7 @@ public function __construct($existsOrOptions = true) * TRUE when the path must exist * FALSE when not existing paths can be given * - * @param boolean $flag Path must exist + * @param bool $flag Path must exist * @return RealPath */ public function setExists($flag = true) @@ -59,7 +59,7 @@ public function setExists($flag = true) /** * Returns true if the filtered path must exist * - * @return boolean + * @return bool */ public function getExists() { diff --git a/test/_files/TestNamespace/StringEquals.php b/test/_files/TestNamespace/StringEquals.php index e14a3198..fd9a6c2d 100644 --- a/test/_files/TestNamespace/StringEquals.php +++ b/test/_files/TestNamespace/StringEquals.php @@ -40,7 +40,7 @@ class StringEquals extends AbstractValidator * are equal to one another with string comparison. * * @param array $value Value to validate - * @return boolean + * @return bool */ public function isValid($value) { From 8557890912cd7cef6ffb076055de9383c1cfe32a Mon Sep 17 00:00:00 2001 From: David Kidd Date: Wed, 9 Jan 2013 14:09:01 -0500 Subject: [PATCH 12/36] Removed file that shouldn't have been there. --- .../tests/ZendTest/Filter/_files/zipextracted.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test/_files/web/frameworks/zf2-iso8601-fork/tests/ZendTest/Filter/_files/zipextracted.txt diff --git a/test/_files/web/frameworks/zf2-iso8601-fork/tests/ZendTest/Filter/_files/zipextracted.txt b/test/_files/web/frameworks/zf2-iso8601-fork/tests/ZendTest/Filter/_files/zipextracted.txt deleted file mode 100644 index 048d9aed..00000000 --- a/test/_files/web/frameworks/zf2-iso8601-fork/tests/ZendTest/Filter/_files/zipextracted.txt +++ /dev/null @@ -1 +0,0 @@ -compress me \ No newline at end of file From 482716d3afff8402564ed01106e2172d05ad8dcd Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 14 Jan 2013 16:00:39 -0600 Subject: [PATCH 13/36] [zendframework/zf2#3376] Added test for new behavior - Added a test displaying that an exception is raised when passing the "e" modifier in a pattern --- test/PregReplaceTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/PregReplaceTest.php b/test/PregReplaceTest.php index 1dc14a06..bc38f066 100644 --- a/test/PregReplaceTest.php +++ b/test/PregReplaceTest.php @@ -97,4 +97,11 @@ public function testFilterThrowsExceptionWhenNoMatchPatternPresent() 'does not have a valid pattern set'); $filtered = $filter($string); } + + public function testPassingPatternWithExecModifierRaisesException() + { + $filter = new PregReplaceFilter(); + $this->setExpectedException('Zend\Filter\Exception\InvalidArgumentException', '"e" pattern modifier'); + $filter->setPattern('/foo/e'); + } } From 94f95cae70a444145a20b6601d70e33b7f1a3370 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Fri, 18 Jan 2013 16:05:27 -0600 Subject: [PATCH 14/36] [zendframework/zf2#3073] Remove namespace from interface reference --- src/Decompress.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Decompress.php b/src/Decompress.php index 61959d60..eb126747 100644 --- a/src/Decompress.php +++ b/src/Decompress.php @@ -32,7 +32,7 @@ public function __invoke($value) } /** - * Defined by Zend\Filter\FilterInterface + * Defined by FilterInterface * * Decompresses the content $value with the defined settings * From f786aa2b88c9c39f69a733ae009d3e3b9bedb579 Mon Sep 17 00:00:00 2001 From: Enrico Zimuel Date: Fri, 25 Jan 2013 14:51:38 +0100 Subject: [PATCH 15/36] Changed the get/setSalt in Mcrypt and BlockCipher + added the setKey in Filter\Encrypt and Filter\Decrypt --- src/Encrypt/BlockCipher.php | 32 +++++++++++++++++++++++++++++--- test/DecryptTest.php | 7 +++---- test/Encrypt/BlockCipherTest.php | 32 ++++++++++++++++++-------------- test/File/DecryptTest.php | 8 ++++---- test/File/EncryptTest.php | 10 +++++----- 5 files changed, 59 insertions(+), 30 deletions(-) diff --git a/src/Encrypt/BlockCipher.php b/src/Encrypt/BlockCipher.php index a247f042..740480e3 100644 --- a/src/Encrypt/BlockCipher.php +++ b/src/Encrypt/BlockCipher.php @@ -34,15 +34,13 @@ class BlockCipher implements EncryptionAlgorithmInterface * 'key_iteration' => the number of iterations for the PBKDF2 key generation * 'algorithm => cipher algorithm to use * 'hash' => algorithm to use for the authentication - * 'iv' => initialization vector + * 'vector => initialization vector * ) */ protected $encryption = array( - 'key' => 'ZendFramework', 'key_iteration' => 5000, 'algorithm' => 'aes', 'hash' => 'sha256', - 'vector' => null, ); /** @@ -182,6 +180,34 @@ public function setVector($vector) return $this; } + /** + * Set the encryption key + * + * @param string $key + * @return BlockCipher + * @throws Exception\InvalidArgumentException + */ + public function setKey($key) + { + try { + $this->blockCipher->setKey($key); + } catch (CryptException\InvalidArgumentException $e) { + throw new Exception\InvalidArgumentException($e->getMessage()); + } + $this->encryption['key'] = $key; + return $this; + } + + /** + * Get the encryption key + * + * @return string + */ + public function getKey() + { + return $this->encryption['key']; + } + /** * Returns the compression * diff --git a/test/DecryptTest.php b/test/DecryptTest.php index 00be3d86..3cd557e0 100644 --- a/test/DecryptTest.php +++ b/test/DecryptTest.php @@ -46,15 +46,14 @@ public function testBasicMcrypt() ); $enc = $filter->getEncryption(); - $filter->setVector('1234567890123456'); - $this->assertEquals('ZendFramework', $enc['key']); + $filter->setKey('1234567890123456'); foreach ($valuesExpected as $input => $output) { $this->assertNotEquals($output, $filter($input)); } } /** - * Ensures that the encryption works fine + * Ensures that the encryption works fine */ public function testDecryptBlockCipher() { @@ -66,7 +65,7 @@ public function testDecryptBlockCipher() $decrypted = $decrypt->filter('ec133eb7460682b0020b736ad6d2ef14c35de0f1e5976330ae1dd096ef3b4cb7MTIzNDU2Nzg5MDEyMzQ1NoZvxY1JkeL6TnQP3ug5F0k='); $this->assertEquals($decrypted, 'test'); } - + /** * Ensures that the filter follows expected behavior * diff --git a/test/Encrypt/BlockCipherTest.php b/test/Encrypt/BlockCipherTest.php index 7bfb5b6c..924889c4 100644 --- a/test/Encrypt/BlockCipherTest.php +++ b/test/Encrypt/BlockCipherTest.php @@ -58,14 +58,18 @@ public function testBasicBlockCipher() */ public function testGetSetVector() { + $filter = new BlockCipherEncryption(array('key' => 'testkey')); - $filter->setVector('testvect'); - $this->assertEquals('testvect', $filter->getVector()); + $filter->setVector('1234567890123456'); + $this->assertEquals('1234567890123456', $filter->getVector()); + } + public function testWrongSizeVector() + { $this->setExpectedException('\Zend\Filter\Exception\InvalidArgumentException'); - $output = $filter->encrypt('test'); + $filter = new BlockCipherEncryption(array('key' => 'testkey')); + $filter->setVector('testvect'); } - /** * Ensures that the filter allows default encryption * @@ -74,13 +78,13 @@ public function testGetSetVector() public function testDefaultEncryption() { $filter = new BlockCipherEncryption(array('key' => 'testkey')); - $filter->setVector('testvect'); + $filter->setVector('1234567890123456'); $this->assertEquals( - array('key' => 'testkey', - 'algorithm' => 'aes', - 'vector' => 'testvect', + array('key' => 'testkey', + 'algorithm' => 'aes', + 'vector' => '1234567890123456', 'key_iteration' => 5000, - 'hash' => 'sha256'), + 'hash' => 'sha256'), $filter->getEncryption() ); } @@ -93,16 +97,16 @@ public function testDefaultEncryption() public function testGetSetEncryption() { $filter = new BlockCipherEncryption(array('key' => 'testkey')); - $filter->setVector('testvect'); + $filter->setVector('1234567890123456'); $filter->setEncryption( array('algorithm' => '3des') ); $this->assertEquals( - array('key' => 'testkey', - 'algorithm' => '3des', - 'vector' => 'testvect', + array('key' => 'testkey', + 'algorithm' => '3des', + 'vector' => '1234567890123456', 'key_iteration' => 5000, - 'hash' => 'sha256'), + 'hash' => 'sha256'), $filter->getEncryption() ); } diff --git a/test/File/DecryptTest.php b/test/File/DecryptTest.php index 19eeef15..728d28cd 100644 --- a/test/File/DecryptTest.php +++ b/test/File/DecryptTest.php @@ -61,7 +61,7 @@ public function testBasic() dirname(__DIR__).'/_files/newencryption.txt', $filter->getFilename()); - $filter->setVector('1234567890123456'); + $filter->setKey('1234567890123456'); $filter->filter(dirname(__DIR__).'/_files/encryption.txt'); $filter = new FileDecrypt(); @@ -70,7 +70,7 @@ public function testBasic() 'Encryption', file_get_contents(dirname(__DIR__).'/_files/newencryption.txt')); - $filter->setVector('1234567890123456'); + $filter->setKey('1234567890123456'); $this->assertEquals( dirname(__DIR__).'/_files/newencryption.txt', $filter->filter(dirname(__DIR__).'/_files/newencryption.txt')); @@ -84,7 +84,7 @@ public function testEncryptionWithDecryption() { $filter = new FileEncrypt(); $filter->setFilename(dirname(__DIR__).'/_files/newencryption.txt'); - $filter->setVector('1234567890123456'); + $filter->setKey('1234567890123456'); $this->assertEquals(dirname(__DIR__).'/_files/newencryption.txt', $filter->filter(dirname(__DIR__).'/_files/encryption.txt')); @@ -99,7 +99,7 @@ public function testEncryptionWithDecryption() dirname(__DIR__).'/_files/newencryption2.txt', $filter->getFilename()); - $filter->setVector('1234567890123456'); + $filter->setKey('1234567890123456'); $input = $filter->filter(dirname(__DIR__).'/_files/newencryption.txt'); $this->assertEquals(dirname(__DIR__).'/_files/newencryption2.txt', $input); diff --git a/test/File/EncryptTest.php b/test/File/EncryptTest.php index 6a695490..32ce03e3 100644 --- a/test/File/EncryptTest.php +++ b/test/File/EncryptTest.php @@ -53,7 +53,7 @@ public function testBasic() dirname(__DIR__).'/_files/newencryption.txt', $filter->getFilename()); - $filter->setVector('1234567890123456'); + $filter->setKey('1234567890123456'); $this->assertEquals(dirname(__DIR__).'/_files/newencryption.txt', $filter->filter(dirname(__DIR__).'/_files/encryption.txt')); @@ -70,7 +70,7 @@ public function testEncryptionWithDecryption() { $filter = new FileEncrypt(); $filter->setFilename(dirname(__DIR__).'/_files/newencryption.txt'); - $filter->setVector('1234567890123456'); + $filter->setKey('1234567890123456'); $this->assertEquals(dirname(__DIR__).'/_files/newencryption.txt', $filter->filter(dirname(__DIR__).'/_files/encryption.txt')); @@ -79,7 +79,7 @@ public function testEncryptionWithDecryption() file_get_contents(dirname(__DIR__).'/_files/newencryption.txt')); $filter = new FileDecrypt(); - $filter->setVector('1234567890123456'); + $filter->setKey('1234567890123456'); $input = $filter->filter(dirname(__DIR__).'/_files/newencryption.txt'); $this->assertEquals(dirname(__DIR__).'/_files/newencryption.txt', $input); @@ -94,7 +94,7 @@ public function testEncryptionWithDecryption() public function testNonExistingFile() { $filter = new FileEncrypt(); - $filter->setVector('1234567890123456'); + $filter->setKey('1234567890123456'); $this->setExpectedException('\Zend\Filter\Exception\InvalidArgumentException', 'not found'); echo $filter->filter(dirname(__DIR__).'/_files/nofile.txt'); @@ -106,7 +106,7 @@ public function testNonExistingFile() public function testEncryptionInSameFile() { $filter = new FileEncrypt(); - $filter->setVector('1234567890123456'); + $filter->setKey('1234567890123456'); copy(dirname(__DIR__).'/_files/encryption.txt', dirname(__DIR__).'/_files/newencryption.txt'); $filter->filter(dirname(__DIR__).'/_files/newencryption.txt'); From 956fa1b7787c8dd7a185c95a15fcedbd91fe0aa9 Mon Sep 17 00:00:00 2001 From: Enrico Zimuel Date: Fri, 25 Jan 2013 15:36:25 +0100 Subject: [PATCH 16/36] Fixed CS issue --- test/EncryptTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/EncryptTest.php b/test/EncryptTest.php index 5ec4b65c..9c884651 100644 --- a/test/EncryptTest.php +++ b/test/EncryptTest.php @@ -54,7 +54,7 @@ public function testBasicBlockCipher() } /** - * Ensures that the encryption works fine + * Ensures that the encryption works fine */ public function testEncryptBlockCipher() { @@ -66,7 +66,7 @@ public function testEncryptBlockCipher() $encrypted = $encrypt->filter('test'); $this->assertEquals($encrypted, 'ec133eb7460682b0020b736ad6d2ef14c35de0f1e5976330ae1dd096ef3b4cb7MTIzNDU2Nzg5MDEyMzQ1NoZvxY1JkeL6TnQP3ug5F0k='); } - + /** * Ensures that the filter follows expected behavior * From c7a2f083f7b706159463ac3a47b1a9f5c7e804e9 Mon Sep 17 00:00:00 2001 From: Enrico Zimuel Date: Fri, 25 Jan 2013 17:18:58 +0100 Subject: [PATCH 17/36] Removed check in getKey of Zend\Cryp\Symmetric\Mcrypt --- src/Encrypt/BlockCipher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Encrypt/BlockCipher.php b/src/Encrypt/BlockCipher.php index 740480e3..f035e50d 100644 --- a/src/Encrypt/BlockCipher.php +++ b/src/Encrypt/BlockCipher.php @@ -34,7 +34,7 @@ class BlockCipher implements EncryptionAlgorithmInterface * 'key_iteration' => the number of iterations for the PBKDF2 key generation * 'algorithm => cipher algorithm to use * 'hash' => algorithm to use for the authentication - * 'vector => initialization vector + * 'vector' => initialization vector * ) */ protected $encryption = array( From 0e95dde86ff20ea5f6795949ceb602d66b6926f9 Mon Sep 17 00:00:00 2001 From: David Windell Date: Thu, 31 Jan 2013 15:06:54 +0000 Subject: [PATCH 18/36] Implement feedback --- ...{DateTimeNormalize.php => DateTimeFormatter.php} | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) rename src/{DateTimeNormalize.php => DateTimeFormatter.php} (84%) diff --git a/src/DateTimeNormalize.php b/src/DateTimeFormatter.php similarity index 84% rename from src/DateTimeNormalize.php rename to src/DateTimeFormatter.php index 25b85ebb..321e8a65 100644 --- a/src/DateTimeNormalize.php +++ b/src/DateTimeFormatter.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -13,7 +13,7 @@ use Exception; use Zend\Filter\AbstractFilter; -class DateTimeNormalize extends AbstractFilter +class DateTimeFormatter extends AbstractFilter { /** * A valid format string accepted by date() @@ -75,16 +75,11 @@ public function filter($value) protected function normalizeDateTime($value) { if (is_int($value)) { - $dateTime = new DateTime(); - $dateTime = $dateTime->setTimestamp($value); + $dateTime = new DateTime('@' . $value); } else { $dateTime = new DateTime($value); } - if ($dateTime) { - return $dateTime->format($this->format); - } - - return $value; + return $dateTime->format($this->format); } } From f03e8b29b30fe1e45b03fe68d29ac4fb6527e567 Mon Sep 17 00:00:00 2001 From: David Windell Date: Thu, 31 Jan 2013 23:29:51 +0000 Subject: [PATCH 19/36] Fixes --- src/DateTimeFormatter.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/DateTimeFormatter.php b/src/DateTimeFormatter.php index 321e8a65..0ec453a3 100644 --- a/src/DateTimeFormatter.php +++ b/src/DateTimeFormatter.php @@ -11,7 +11,6 @@ use DateTime; use Exception; -use Zend\Filter\AbstractFilter; class DateTimeFormatter extends AbstractFilter { @@ -26,7 +25,6 @@ class DateTimeFormatter extends AbstractFilter * Sets filter options * * @param string|array|\Zend\Config\Config $options - * @return void */ public function __construct($options = null) { @@ -36,10 +34,10 @@ public function __construct($options = null) } /** - * Set the format string accepted by date() to use when normalizing a string + * Set the format string accepted by date() to use when formatting a string * * @param string $format - * @return \Zend\Filter\DateTimeNormalize + * @return \Zend\Filter\DateTimeFormatter */ public function setFormat($format) { From 8e4ee17fb2467b4f130b515cc609a6a56e04676a Mon Sep 17 00:00:00 2001 From: David Windell Date: Fri, 1 Feb 2013 17:45:24 +0000 Subject: [PATCH 20/36] Added some tests --- test/DateTimeFormatterTest.php | 57 ++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 test/DateTimeFormatterTest.php diff --git a/test/DateTimeFormatterTest.php b/test/DateTimeFormatterTest.php new file mode 100644 index 00000000..45824968 --- /dev/null +++ b/test/DateTimeFormatterTest.php @@ -0,0 +1,57 @@ +filter('2012-01-01'); + $this->assertEquals('2012-01-01T00:00:00+0000', $result); + } + + public function testSetFormat() + { + $filter = new DateTimeFormatter(); + $filter->setFormat(DateTime::RFC1036); + $result = $filter->filter('2012-01-01'); + $this->assertEquals('Sun, 01 Jan 12 00:00:00 +0000', $result); + } + + public function testFormatDateTimeFromTimestamp() + { + $filter = new DateTimeFormatter(); + $result = $filter->filter(1359739801); + $this->assertEquals('2013-02-01T17:30:01+0000', $result); + } + + public function testOriginalValueReturnedOnInvalidInput() + { + $filter = new DateTimeFormatter(); + $result = $filter->filter('2013-31-31'); + $this->assertEquals('2013-31-31', $result); + } +} From 2182c2de743146fb220f57b049b528281c5f5189 Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Mon, 11 Feb 2013 09:05:26 +0100 Subject: [PATCH 21/36] Typo --- test/File/RenameUploadTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/File/RenameUploadTest.php b/test/File/RenameUploadTest.php index b6700bf8..cc1049d8 100644 --- a/test/File/RenameUploadTest.php +++ b/test/File/RenameUploadTest.php @@ -284,7 +284,7 @@ public function testInvalidConstruction() /** * @return void */ - public function testCanFilterMultipleTimesWithsameResult() + public function testCanFilterMultipleTimesWithSameResult() { $filter = new RenameUploadMock(array( 'target' => $this->_newFile, From 58ea260a1349e460269e9792676b242cfd5cbd24 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 16 Feb 2013 03:37:32 +0700 Subject: [PATCH 22/36] fix trailing spaces --- src/File/RenameUpload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/File/RenameUpload.php b/src/File/RenameUpload.php index 32aeab37..ce1772f6 100644 --- a/src/File/RenameUpload.php +++ b/src/File/RenameUpload.php @@ -29,7 +29,7 @@ class RenameUpload extends AbstractFilter * Store already filtered values, so we can filter multiple * times the same file without being block by move_uploaded_file * internal checks - * + * * @var array */ protected $alreadyFiltered = array(); From 26a1cb55f0127c8642a8cc8f2be1d142a224bcb3 Mon Sep 17 00:00:00 2001 From: Gordon Stratton Date: Fri, 15 Feb 2013 20:20:29 +0000 Subject: [PATCH 23/36] Remove extra semicolons --- test/StripTagsTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/StripTagsTest.php b/test/StripTagsTest.php index fc04ec9b..15024552 100644 --- a/test/StripTagsTest.php +++ b/test/StripTagsTest.php @@ -520,7 +520,7 @@ public function testMultiQuoteInput() */ public function testNotClosedHtmlCommentAtEndOfString() { - $input = 'text