0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-10 07:38:41 +00:00
htmlpurifier/tests/HTMLPurifier/AttrTransform/NameTest.php

31 lines
645 B
PHP
Raw Normal View History

<?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')
);
}
}