Fix two minor bugs, updating Phorum and removing unused $dir variable.
[htmlpurifier/darkodev.git] / tests / HTMLPurifier / AttrTransform / NameSyncTest.php
blobbae4a8d03bd43863da926781459050677682eae5
1 <?php
3 class HTMLPurifier_AttrTransform_NameSyncTest extends HTMLPurifier_AttrTransformHarness
6 function setUp() {
7 parent::setUp();
8 $this->obj = new HTMLPurifier_AttrTransform_NameSync();
9 $this->accumulator = new HTMLPurifier_IDAccumulator();
10 $this->context->register('IDAccumulator', $this->accumulator);
11 $this->config->set('Attr.EnableID', true);
14 function testEmpty() {
15 $this->assertResult( array() );
18 function testAllowSame() {
19 $this->assertResult(
20 array('name' => 'free', 'id' => 'free')
24 function testAllowDifferent() {
25 $this->assertResult(
26 array('name' => 'tryit', 'id' => 'thisgood')
30 function testCheckName() {
31 $this->accumulator->add('notok');
32 $this->assertResult(
33 array('name' => 'notok', 'id' => 'ok'),
34 array('id' => 'ok')
40 // vim: et sw=4 sts=4