From 4cd67c62a7619ca170d38cf27b3446f57baae276 Mon Sep 17 00:00:00 2001 From: Andreas Leathley Date: Wed, 10 Jul 2019 23:33:43 +0200 Subject: [PATCH] Rename RemoveHTMLFilter --- src/Filter/{RemoveHTMLFilter.php => RemoveHTMLTagsFilter.php} | 2 +- tests/StringFilterTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/Filter/{RemoveHTMLFilter.php => RemoveHTMLTagsFilter.php} (78%) diff --git a/src/Filter/RemoveHTMLFilter.php b/src/Filter/RemoveHTMLTagsFilter.php similarity index 78% rename from src/Filter/RemoveHTMLFilter.php rename to src/Filter/RemoveHTMLTagsFilter.php index 6c12ac3..b25d88f 100644 --- a/src/Filter/RemoveHTMLFilter.php +++ b/src/Filter/RemoveHTMLTagsFilter.php @@ -7,7 +7,7 @@ /** * Remove HTML tags */ -class RemoveHTMLFilter implements StringFilterInterface +class RemoveHTMLTagsFilter implements StringFilterInterface { public function filter(string $string): string { diff --git a/tests/StringFilterTest.php b/tests/StringFilterTest.php index b667b43..30b88c0 100644 --- a/tests/StringFilterTest.php +++ b/tests/StringFilterTest.php @@ -10,7 +10,7 @@ use Squirrel\Strings\Filter\LowercaseFilter; use Squirrel\Strings\Filter\NormalizeLettersToAsciiFilter; use Squirrel\Strings\Filter\RemoveExcessSpacesFilter; -use Squirrel\Strings\Filter\RemoveHTMLFilter; +use Squirrel\Strings\Filter\RemoveHTMLTagsFilter; use Squirrel\Strings\Filter\RemoveNonAlphanumericFilter; use Squirrel\Strings\Filter\RemoveNonAsciiAndControlCharactersFilter; use Squirrel\Strings\Filter\RemoveNonNumericFilter; @@ -69,7 +69,7 @@ public function testRemoveExcessSpaces() public function testRemoveHTML() { - $this->assertEquals(" & haha many \xc2\xa0   grüss götter \r\n\n\n\t \n \n \"l'etat\"\\ thing contained!!!™ ", (new RemoveHTMLFilter())->filter($this->testString)); + $this->assertEquals(" & haha many \xc2\xa0   grüss götter \r\n\n\n\t \n \n \"l'etat\"\\ thing contained!!!™ ", (new RemoveHTMLTagsFilter())->filter($this->testString)); } public function testReplaceNewlinesWithSpaces()