Improve auto-paragraph to preserve newlines and handle edge-cases better.
[htmlpurifier.git] / tests / HTMLPurifier / AttrTypesTest.php
blob2be2fca9fcb312cef9f6152c6c62452dcacebf28
1 <?php
3 class HTMLPurifier_AttrTypesTest extends HTMLPurifier_Harness
6 function test_get() {
7 $types = new HTMLPurifier_AttrTypes();
9 $this->assertIdentical(
10 $types->get('CDATA'),
11 new HTMLPurifier_AttrDef_Text()
14 $this->expectError('Cannot retrieve undefined attribute type foobar');
15 $types->get('foobar');
17 $this->assertIdentical(
18 $types->get('Enum#foo,bar'),
19 new HTMLPurifier_AttrDef_Enum(array('foo', 'bar'))