You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NameTest.php 691B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. class HTMLPurifier_AttrTransform_NameTest extends HTMLPurifier_AttrTransformHarness
  3. {
  4. public function setUp()
  5. {
  6. parent::setUp();
  7. $this->obj = new HTMLPurifier_AttrTransform_Name();
  8. }
  9. public function testEmpty()
  10. {
  11. $this->assertResult( array() );
  12. }
  13. public function testTransformNameToID()
  14. {
  15. $this->assertResult(
  16. array('name' => 'free'),
  17. array('id' => 'free')
  18. );
  19. }
  20. public function testExistingIDOverridesName()
  21. {
  22. $this->assertResult(
  23. array('name' => 'tryit', 'id' => 'tobad'),
  24. array('id' => 'tobad')
  25. );
  26. }
  27. }
  28. // vim: et sw=4 sts=4