mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 08:21:52 +00:00
Refine tests to include attribute checks and some other cases.
git-svn-id: http://htmlpurifier.org/svnroot/html_purifier/trunk@40 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
eefb08b6f9
commit
ffbeaf66d1
@ -73,6 +73,7 @@ class Test_PureHTMLDefinition extends UnitTestCase
|
||||
,new MF_Text('bold')
|
||||
,new MF_EndTag('b')
|
||||
,new MF_Text(' text')
|
||||
,new MF_EmptyTag('br')
|
||||
);
|
||||
$expect[1] = $inputs[1];
|
||||
|
||||
@ -109,15 +110,17 @@ class Test_PureHTMLDefinition extends UnitTestCase
|
||||
,new MF_Text('</b>')
|
||||
);
|
||||
|
||||
$inputs[5] = array(new MF_StartTag('br'));
|
||||
$expect[5] = array(new MF_EmptyTag('br'));
|
||||
$inputs[5] = array(new MF_StartTag('br', array('style' => 'clear:both;')));
|
||||
$expect[5] = array(new MF_EmptyTag('br', array('style' => 'clear:both;')));
|
||||
|
||||
$inputs[6] = array(new MF_EmptyTag('div'));
|
||||
$inputs[6] = array(new MF_EmptyTag('div', array('style' => 'clear:both;')));
|
||||
$expect[6] = array(
|
||||
new MF_StartTag('div')
|
||||
new MF_StartTag('div', array('style' => 'clear:both;'))
|
||||
,new MF_EndTag('div')
|
||||
);
|
||||
|
||||
// demonstrates start tag precedence
|
||||
|
||||
foreach ($inputs as $i => $input) {
|
||||
$result = $this->def->makeWellFormed($input);
|
||||
$this->assertEqual($expect[$i], $result);
|
||||
|
Loading…
Reference in New Issue
Block a user