ListTest.php
1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
class HTMLPurifier_ChildDef_ListTest extends HTMLPurifier_ChildDefHarness
{
public function setUp()
{
parent::setUp();
$this->obj = new HTMLPurifier_ChildDef_List();
}
public function testEmptyInput()
{
$this->assertResult('', false);
}
public function testSingleLi()
{
$this->assertResult('<li />');
}
public function testSomeLi()
{
$this->assertResult('<li>asdf</li><li />');
}
public function testOlAtBeginning()
{
$this->assertResult('<ol />', '<li><ol /></li>');
}
public function testOlAtBeginningWithOtherJunk()
{
$this->assertResult('<ol /><li />', '<li><ol /></li><li />');
}
public function testOlInMiddle()
{
$this->assertResult('<li>Foo</li><ol><li>Bar</li></ol>', '<li>Foo<ol><li>Bar</li></ol></li>');
}
public function testMultipleOl()
{
$this->assertResult('<li /><ol /><ol />', '<li><ol /><ol /></li>');
}
public function testUlAtBeginning()
{
$this->assertResult('<ul />', '<li><ul /></li>');
}
}
// vim: et sw=4 sts=4