From ff72a2660a30eecb6c14eb1e0253a3949e3307a3 Mon Sep 17 00:00:00 2001 From: "FiveFilters.org" Date: Fri, 13 Aug 2021 21:43:59 +0200 Subject: Clean up test classes/redundant code --- test/ReadabilityTest.php | 6 +----- test/TestPage.php | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/ReadabilityTest.php b/test/ReadabilityTest.php index 4ca71cf..a0d7514 100644 --- a/test/ReadabilityTest.php +++ b/test/ReadabilityTest.php @@ -40,11 +40,7 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase $expected_no_whitespace = preg_replace($from, $to, $testPage->getExpectedHTML()); $readability_no_whitespace = preg_replace($from, $to, $readability->getContent()); - $this->assertSame( - preg_replace($from, $to, $expected_no_whitespace), - preg_replace($from, $to, $readability_no_whitespace), - 'Parsed text does not match the expected one.' - ); + $this->assertSame($expected_no_whitespace, $readability_no_whitespace, 'Parsed text does not match the expected one.'); //$this->assertSame($testPage->getExpectedHTML(), $readability->getContent(), 'Parsed text does not match the expected one.'); //$this->assertXmlStringEqualsXmlString($testPage->getExpectedHTML(), $readability->getContent(), 'Parsed text does not match the expected one.'); diff --git a/test/TestPage.php b/test/TestPage.php index 812442b..954ddec 100644 --- a/test/TestPage.php +++ b/test/TestPage.php @@ -38,7 +38,7 @@ class TestPage } /** - * @return null + * @return string */ public function getSourceHTML() { @@ -46,7 +46,7 @@ class TestPage } /** - * @return null + * @return string */ public function getExpectedHTML() { -- cgit v1.2.3