0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-09-21 19:45:17 +00:00
htmlpurifier/tests/HTMLPurifier/Strategy/MakeWellFormed/SkipInjectorTest.php
Edward Z. Yang 86ca784da3 Convert all to new configuration get/set format.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
2009-02-21 03:00:34 -05:00

28 lines
857 B
PHP

<?php
class HTMLPurifier_Strategy_MakeWellFormed_SkipInjectorTest extends HTMLPurifier_StrategyHarness
{
function setUp() {
parent::setUp();
$this->obj = new HTMLPurifier_Strategy_MakeWellFormed();
$this->config->set('AutoFormat.Custom', array(
new HTMLPurifier_Strategy_MakeWellFormed_SkipInjector()
));
}
function testEmpty() {
$this->assertResult('');
}
function testMultiply() {
$this->assertResult('<br />', '<br /><br />');
}
function testMultiplyMultiply() {
$this->config->set('AutoFormat.Custom', array(
new HTMLPurifier_Strategy_MakeWellFormed_SkipInjector(),
new HTMLPurifier_Strategy_MakeWellFormed_SkipInjector()
));
$this->assertResult('<br />', '<br /><br /><br /><br />');
}
}
// vim: et sw=4 sts=4