2007-05-23 00:39:07 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class HTMLPurifier_AttrDef_HTML_BoolTest extends HTMLPurifier_AttrDefHarness
|
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-05-23 00:39:07 +00:00
|
|
|
function test() {
|
|
|
|
$this->def = new HTMLPurifier_AttrDef_HTML_Bool('foo');
|
|
|
|
$this->assertDef('foo');
|
|
|
|
$this->assertDef('', false);
|
2008-03-02 02:05:47 +00:00
|
|
|
$this->assertDef('bar', 'foo');
|
2007-05-23 00:39:07 +00:00
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-05-23 00:39:07 +00:00
|
|
|
function test_make() {
|
|
|
|
$factory = new HTMLPurifier_AttrDef_HTML_Bool();
|
|
|
|
$def = $factory->make('foo');
|
|
|
|
$def2 = new HTMLPurifier_AttrDef_HTML_Bool('foo');
|
|
|
|
$this->assertIdentical($def, $def2);
|
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-05-23 00:39:07 +00:00
|
|
|
}
|
|
|
|
|