From 541fab34a0070400a6874f8a7d0777da20d58cdc Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 3 Mar 2025 23:55:32 +0100 Subject: [PATCH] tests: Remove pointless debug assignment It is unused since 8ab7d76cd5209a69f3459db5f7bd578e5cbcc5e8. --- tests/ReadabilityTest.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tests/ReadabilityTest.php b/tests/ReadabilityTest.php index 595d327..f106b5a 100644 --- a/tests/ReadabilityTest.php +++ b/tests/ReadabilityTest.php @@ -115,7 +115,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testInitDiv(): void { $readability = $this->getReadability('
' . str_repeat('This is the awesome content :)', 7) . '
', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -129,7 +128,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testWithFootnotes(): void { $readability = $this->getReadability('
' . str_repeat('

This is an awesome text with some links, here there are: the awesome

', 7) . '
', 'http://0.0.0.0'); - $readability->debug = true; $readability->convertLinksToFootnotes = true; $res = $readability->init(); @@ -146,7 +144,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testStandardClean(): void { $readability = $this->getReadability('

Title

' . str_repeat('

This is an awesome text with some links, here there are: the awesome

', 7) . 'will NOT be removed
', 'http://0.0.0.0'); - $readability->debug = true; $readability->lightClean = false; $res = $readability->init(); @@ -163,7 +160,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testWithIframe(): void { $readability = $this->getReadability('

Title

' . str_repeat('

This is an awesome text with some links, here there are: the awesome

', 7) . '

This is an awesome text with some links, here there are

', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -178,7 +174,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testWithArticle(): void { $readability = $this->getReadability('

' . str_repeat('This is an awesome text with some links, here there are: the awesome', 20) . '

This is an awesome text with some links, here there are

', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -193,7 +188,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testWithAside(): void { $readability = $this->getReadability('
' . str_repeat('

This is an awesome text with some links, here there are: the awesome

', 7) . '
', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -208,7 +202,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testWithClasses(): void { $readability = $this->getReadability('
' . str_repeat('

This is an awesome text with some links, here there are: the awesome

', 7) . '
' . str_repeat('

This text should be removed

', 10) . '
', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -223,7 +216,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testWithClassesWithoutLightClean(): void { $readability = $this->getReadability('
' . str_repeat('

This is an awesome text with some links, here there are: the awesome

', 7) . '
' . str_repeat('

This text should be removed

', 10) . '
', 'http://0.0.0.0'); - $readability->debug = true; $readability->lightClean = false; $res = $readability->init(); @@ -239,7 +231,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testWithTd(): void { $readability = $this->getReadability('' . str_repeat('', 7) . '

This is an awesome text with some links, here there are the awesome

', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -252,7 +243,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testWithSameClasses(): void { $readability = $this->getReadability('
' . str_repeat('

This is an awesome text with some links, here there are the awesome

', 7) . '
This text is also an awesome text and you should know that !
', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -266,7 +256,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testWithScript(): void { $readability = $this->getReadability('
' . str_repeat('

This is an awesome text with some links, here there are the awesome

', 7) . '

', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -280,7 +269,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testTitle(): void { $readability = $this->getReadability('this is my title
' . str_repeat('

This is an awesome text with some links, here there are the awesome

', 7) . '

', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -294,7 +282,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testTitleWithDash(): void { $readability = $this->getReadability(' title2 - title3
' . str_repeat('

This is an awesome text with some links, here there are the awesome

', 7) . '

', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -308,7 +295,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testTitleWithDoubleDot(): void { $readability = $this->getReadability(' title2 : title3
' . str_repeat('

This is an awesome text with some links, here there are the awesome

', 7) . '

', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -322,7 +308,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testTitleTooShortUseH1(): void { $readability = $this->getReadability('too short

this is my h1 title !

' . str_repeat('

This is an awesome text with some links, here there are the awesome

', 7) . '

', 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -369,7 +354,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase '; $readability = $this->getReadability($data, 'http://iosgames.ru/?p=22030'); - $readability->debug = true; $res = $readability->init(); @@ -437,7 +421,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase '; $readability = $this->getReadability($data, 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); @@ -474,7 +457,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase $html = (string) file_get_contents('tests/fixtures/childNodeGoesNull.html'); $readability = $this->getReadability($html, 'http://0.0.0.0'); - $readability->debug = true; $readability->convertLinksToFootnotes = true; $res = $readability->init(); @@ -487,7 +469,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase $html = (string) file_get_contents('tests/fixtures/keepFootnotes.html'); $readability = $this->getReadability($html, 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -501,7 +482,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase $html = (string) file_get_contents('tests/fixtures/wipedBody.html'); $readability = $this->getReadability($html, 'http://0.0.0.0', 'libxml', false); - $readability->debug = true; $res = $readability->init(); $this->assertTrue($res); @@ -540,7 +520,6 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase public function testVisibleNode(string $content, bool $shouldBeVisible): void { $readability = $this->getReadability($content, 'http://0.0.0.0'); - $readability->debug = true; $res = $readability->init(); if ($shouldBeVisible) {