@ -215,6 +215,22 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
$this->assertNotContains('This text should be removed', $readability->getContent()->innerHTML);
$this->assertNotContains('This text should be removed', $readability->getContent()->innerHTML);
}
}
public function testWithClassesWithoutLightClean()
{
$readability = new ReadabilityTested('<article>'.str_repeat('<p>This is an awesome text with some links, here there are: <ahref="http://0.0.0.0/test.html">the awesome</a></p>', 7).'<divstyle="display:none">'.str_repeat('<pclass="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);
$this->assertNotContains('This text should be removed', $readability->getContent()->innerHTML);
}
public function testWithTd()
public function testWithTd()
{
{
$readability = new ReadabilityTested('<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');
$readability = new ReadabilityTested('<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 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase