Release 2.1.0, merged in 1313 to HEAD.
[htmlpurifier.git] / tests / HTMLPurifier / AttrTypesTest.php
blobc207c32024d11d8256c3aa8e4dd313fa3af494fe
1 <?php
3 require_once 'HTMLPurifier/AttrTypes.php';
5 class HTMLPurifier_AttrTypesTest extends HTMLPurifier_Harness
8 function test_get() {
9 $types = new HTMLPurifier_AttrTypes();
11 $this->assertIdentical(
12 $types->get('CDATA'),
13 $types->info['CDATA']
16 $this->expectError('Cannot retrieve undefined attribute type foobar');
17 $types->get('foobar');
19 $this->assertIdentical(
20 $types->get('Enum#foo,bar'),
21 new HTMLPurifier_AttrDef_Enum(array('foo', 'bar'))