Skip to content

Commit 5afefcf

Browse files
committed
tests: Remove pointless debug assignment
It is unused since 8ab7d76. (cherry picked from commit 541fab3)
1 parent eb6ca1a commit 5afefcf

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

tests/ReadabilityTest.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ public function testInitDivP()
106106
public function testInitDiv()
107107
{
108108
$readability = $this->getReadability('<div>' . str_repeat('This is the awesome content :)', 7) . '</div>', 'http://0.0.0.0');
109-
$readability->debug = true;
110109
$res = $readability->init();
111110

112111
$this->assertTrue($res);
@@ -120,7 +119,6 @@ public function testInitDiv()
120119
public function testWithFootnotes()
121120
{
122121
$readability = $this->getReadability('<div>' . str_repeat('<p>This is an awesome text with some links, here there are: <a href="http://0.0.0.0/test.html">the awesome</a></p>', 7) . '</div>', 'http://0.0.0.0');
123-
$readability->debug = true;
124122
$readability->convertLinksToFootnotes = true;
125123
$res = $readability->init();
126124

@@ -137,7 +135,6 @@ public function testWithFootnotes()
137135
public function testStandardClean()
138136
{
139137
$readability = $this->getReadability('<div><h2>Title</h2>' . str_repeat('<p>This is an awesome text with some links, here there are: <a href="http://0.0.0.0/test.html">the awesome</a></p>', 7) . '<a href="#nofollow" rel="nofollow">will NOT be removed</a></div>', 'http://0.0.0.0');
140-
$readability->debug = true;
141138
$readability->lightClean = false;
142139
$res = $readability->init();
143140

@@ -154,7 +151,6 @@ public function testStandardClean()
154151
public function testWithIframe()
155152
{
156153
$readability = $this->getReadability('<div><h2>Title</h2>' . str_repeat('<p>This is an awesome text with some links, here there are: <a href="http://0.0.0.0/test.html">the awesome</a></p>', 7) . '<p>This is an awesome text with some links, here there are <iframe src="http://youtube.com/test" href="#nofollow" rel="nofollow"></iframe><iframe>http://soundcloud.com/test</iframe></p></div>', 'http://0.0.0.0');
157-
$readability->debug = true;
158154
$res = $readability->init();
159155

160156
$this->assertTrue($res);
@@ -169,7 +165,6 @@ public function testWithIframe()
169165
public function testWithArticle()
170166
{
171167
$readability = $this->getReadability('<article><p>' . str_repeat('This is an awesome text with some links, here there are: the awesome', 20) . '</p><p>This is an awesome text with some links, here there are <iframe src="http://youtube.com/test" href="#nofollow" rel="nofollow"></iframe></p></article>', 'http://0.0.0.0');
172-
$readability->debug = true;
173168
$res = $readability->init();
174169

175170
$this->assertTrue($res);
@@ -184,7 +179,6 @@ public function testWithArticle()
184179
public function testWithAside()
185180
{
186181
$readability = $this->getReadability('<article>' . str_repeat('<p>This is an awesome text with some links, here there are: <a href="http://0.0.0.0/test.html">the awesome</a></p>', 7) . '<footer><aside>' . str_repeat('<p>This is an awesome text with some links, here there are</p>', 8) . '</aside></footer></article>', 'http://0.0.0.0');
187-
$readability->debug = true;
188182
$res = $readability->init();
189183

190184
$this->assertTrue($res);
@@ -199,7 +193,6 @@ public function testWithAside()
199193
public function testWithClasses()
200194
{
201195
$readability = $this->getReadability('<article>' . str_repeat('<p>This is an awesome text with some links, here there are: <a href="http://0.0.0.0/test.html">the awesome</a></p>', 7) . '<div style="display:none">' . str_repeat('<p class="clock">This text should be removed</p>', 10) . '</div></article>', 'http://0.0.0.0');
202-
$readability->debug = true;
203196
$res = $readability->init();
204197

205198
$this->assertTrue($res);
@@ -214,7 +207,6 @@ public function testWithClasses()
214207
public function testWithClassesWithoutLightClean()
215208
{
216209
$readability = $this->getReadability('<article>' . str_repeat('<p>This is an awesome text with some links, here there are: <a href="http://0.0.0.0/test.html">the awesome</a></p>', 7) . '<div style="display:none">' . str_repeat('<p class="clock">This text should be removed</p>', 10) . '</div></article>', 'http://0.0.0.0');
217-
$readability->debug = true;
218210
$readability->lightClean = false;
219211
$res = $readability->init();
220212

@@ -230,7 +222,6 @@ public function testWithClassesWithoutLightClean()
230222
public function testWithTd()
231223
{
232224
$readability = $this->getReadability('<table><tr>' . str_repeat('<td><p>This is an awesome text with some links, here there are the awesome</td>', 7) . '</tr></table>', 'http://0.0.0.0');
233-
$readability->debug = true;
234225
$res = $readability->init();
235226

236227
$this->assertTrue($res);
@@ -243,7 +234,6 @@ public function testWithTd()
243234
public function testWithSameClasses()
244235
{
245236
$readability = $this->getReadability('<article class="awesomecontent">' . str_repeat('<p>This is an awesome text with some links, here there are the awesome</p>', 7) . '<div class="awesomecontent">This text is also an awesome text and you should know that !</div></article>', 'http://0.0.0.0');
246-
$readability->debug = true;
247237
$res = $readability->init();
248238

249239
$this->assertTrue($res);
@@ -257,7 +247,6 @@ public function testWithSameClasses()
257247
public function testWithScript()
258248
{
259249
$readability = $this->getReadability('<article class="awesomecontent">' . str_repeat('<p>This is an awesome text with some links, here there are the awesome</p>', 7) . '<p><script>This text is also an awesome text and you should know that !</script></p></article>', 'http://0.0.0.0');
260-
$readability->debug = true;
261250
$res = $readability->init();
262251

263252
$this->assertTrue($res);
@@ -271,7 +260,6 @@ public function testWithScript()
271260
public function testTitle()
272261
{
273262
$readability = $this->getReadability('<title>this is my title</title><article class="awesomecontent">' . str_repeat('<p>This is an awesome text with some links, here there are the awesome</p>', 7) . '<p></p></article>', 'http://0.0.0.0');
274-
$readability->debug = true;
275263
$res = $readability->init();
276264

277265
$this->assertTrue($res);
@@ -285,7 +273,6 @@ public function testTitle()
285273
public function testTitleWithDash()
286274
{
287275
$readability = $this->getReadability('<title> title2 - title3 </title><article class="awesomecontent">' . str_repeat('<p>This is an awesome text with some links, here there are the awesome</p>', 7) . '<p></p></article>', 'http://0.0.0.0');
288-
$readability->debug = true;
289276
$res = $readability->init();
290277

291278
$this->assertTrue($res);
@@ -299,7 +286,6 @@ public function testTitleWithDash()
299286
public function testTitleWithDoubleDot()
300287
{
301288
$readability = $this->getReadability('<title> title2 : title3 </title><article class="awesomecontent">' . str_repeat('<p>This is an awesome text with some links, here there are the awesome</p>', 7) . '<p></p></article>', 'http://0.0.0.0');
302-
$readability->debug = true;
303289
$res = $readability->init();
304290

305291
$this->assertTrue($res);
@@ -313,7 +299,6 @@ public function testTitleWithDoubleDot()
313299
public function testTitleTooShortUseH1()
314300
{
315301
$readability = $this->getReadability('<title>too short</title><h1>this is my h1 title !</h1><article class="awesomecontent">' . str_repeat('<p>This is an awesome text with some links, here there are the awesome</p>', 7) . '<p></p></article>', 'http://0.0.0.0');
316-
$readability->debug = true;
317302
$res = $readability->init();
318303

319304
$this->assertTrue($res);
@@ -365,7 +350,6 @@ public function testAutoClosingIframeNotThrowingException()
365350
</html>';
366351

367352
$readability = $this->getReadability($data, 'http://iosgames.ru/?p=22030');
368-
$readability->debug = true;
369353

370354
$res = $readability->init();
371355

@@ -433,7 +417,6 @@ public function testAppendIdAlreadyHere()
433417
</html>';
434418

435419
$readability = $this->getReadability($data, 'http://0.0.0.0');
436-
$readability->debug = true;
437420

438421
$res = $readability->init();
439422

@@ -472,7 +455,6 @@ public function testChildNodeGoneNull()
472455
$html = file_get_contents('tests/fixtures/childNodeGoesNull.html');
473456

474457
$readability = $this->getReadability($html, 'http://0.0.0.0');
475-
$readability->debug = true;
476458
$readability->convertLinksToFootnotes = true;
477459
$res = $readability->init();
478460

@@ -485,7 +467,6 @@ public function testKeepFootnotes()
485467
$html = file_get_contents('tests/fixtures/keepFootnotes.html');
486468

487469
$readability = $this->getReadability($html, 'http://0.0.0.0');
488-
$readability->debug = true;
489470
$res = $readability->init();
490471

491472
$this->assertTrue($res);
@@ -499,7 +480,6 @@ public function testWithWipedBody()
499480
$html = file_get_contents('tests/fixtures/wipedBody.html');
500481

501482
$readability = $this->getReadability($html, 'http://0.0.0.0', 'libxml', false);
502-
$readability->debug = true;
503483
$res = $readability->init();
504484

505485
$this->assertTrue($res);

0 commit comments

Comments
 (0)