You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ReadabilityTest.php
+33-2Lines changed: 33 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -215,6 +215,22 @@ public function testWithClasses()
215
215
$this->assertNotContains('This text should be removed', $readability->getContent()->innerHTML);
216
216
}
217
217
218
+
publicfunctiontestWithClassesWithoutLightClean()
219
+
{
220
+
$readability = newReadabilityTested('<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');
$this->assertContains('This is an awesome text with some links, here there are', $readability->getContent()->innerHTML);
231
+
$this->assertNotContains('This text should be removed', $readability->getContent()->innerHTML);
232
+
}
233
+
218
234
publicfunctiontestWithTd()
219
235
{
220
236
$readability = newReadabilityTested('<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');
@@ -429,7 +445,22 @@ public function testAppendIdAlreadyHere()
0 commit comments