mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 08:51:53 +00:00
12b811d749
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
32 lines
647 B
PHP
32 lines
647 B
PHP
<?php
|
|
|
|
class HTMLPurifier_AttrTransform_NameTest extends HTMLPurifier_AttrTransformHarness
|
|
{
|
|
|
|
function setUp() {
|
|
parent::setUp();
|
|
$this->obj = new HTMLPurifier_AttrTransform_Name();
|
|
}
|
|
|
|
function testEmpty() {
|
|
$this->assertResult( array() );
|
|
}
|
|
|
|
function testTransformNameToID() {
|
|
$this->assertResult(
|
|
array('name' => 'free'),
|
|
array('id' => 'free')
|
|
);
|
|
}
|
|
|
|
function testExistingIDOverridesName() {
|
|
$this->assertResult(
|
|
array('name' => 'tryit', 'id' => 'tobad'),
|
|
array('id' => 'tobad')
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
// vim: et sw=4 sts=4
|