BoolTest.php 548 B

12345678910111213141516171819202122
  1. <?php
  2. class HTMLPurifier_AttrDef_HTML_BoolTest extends HTMLPurifier_AttrDefHarness
  3. {
  4. function test() {
  5. $this->def = new HTMLPurifier_AttrDef_HTML_Bool('foo');
  6. $this->assertDef('foo');
  7. $this->assertDef('', false);
  8. $this->assertDef('bar', 'foo');
  9. }
  10. function test_make() {
  11. $factory = new HTMLPurifier_AttrDef_HTML_Bool();
  12. $def = $factory->make('foo');
  13. $def2 = new HTMLPurifier_AttrDef_HTML_Bool('foo');
  14. $this->assertIdentical($def, $def2);
  15. }
  16. }
  17. // vim: et sw=4 sts=4