config->set('AutoFormat.RemoveEmpty', true);
}
public function testPreserve()
{
$this->assertResult('asdf');
}
public function testRemove()
{
$this->assertResult('', '');
}
public function testRemoveWithSpace()
{
$this->assertResult(' ', '');
}
public function testRemoveWithAttr()
{
$this->assertResult('', '');
}
public function testRemoveIdAndName()
{
$this->assertResult('', '');
}
public function testPreserveColgroup()
{
$this->assertResult('
');
}
public function testPreserveId()
{
$this->config->set('Attr.EnableID', true);
$this->assertResult('');
}
public function testPreserveName()
{
$this->config->set('Attr.EnableID', true);
$this->assertResult('');
}
public function testRemoveNested()
{
$this->assertResult('', '');
}
public function testRemoveNested2()
{
$this->assertResult('', '');
}
public function testRemoveNested3()
{
$this->assertResult(' ', '');
}
public function testRemoveNbsp()
{
$this->config->set('AutoFormat.RemoveEmpty.RemoveNbsp', true);
$this->assertResult(' ', '');
}
public function testRemoveNbspMix()
{
$this->config->set('AutoFormat.RemoveEmpty.RemoveNbsp', true);
$this->assertResult(' ', '');
}
public function testRemoveLi()
{
$this->assertResult("", '');
}
public function testDontRemoveNbsp()
{
$this->config->set('AutoFormat.RemoveEmpty.RemoveNbsp', true);
$this->assertResult(' ', " | \xC2\xA0 | ");
}
public function testRemoveNbspExceptionsSpecial()
{
$this->config->set('AutoFormat.RemoveEmpty.RemoveNbsp', true);
$this->config->set('AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions', 'b');
$this->assertResult(' ', "\xC2\xA0");
}
public function testRemoveIframe()
{
$this->config->set('HTML.SafeIframe', true);
$this->assertResult('', '');
}
public function testNoRemoveIframe()
{
$this->config->set('HTML.SafeIframe', true);
$this->assertResult('', '');
}
public function testRemoveDisallowedIframe()
{
$this->config->set('HTML.SafeIframe', true);
$this->config->set('URI.SafeIframeRegexp', '%^http://www.youtube.com/embed/%');
$this->assertResult('', '');
}
}
// vim: et sw=4 sts=4