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
|
|
|
|
2013-07-16 11:56:14 +00:00
|
|
|
public function test()
|
|
|
|
{
|
2007-05-23 00:39:07 +00:00
|
|
|
$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
|
|
|
|
2013-07-16 11:56:14 +00:00
|
|
|
public function test_make()
|
|
|
|
{
|
2007-05-23 00:39:07 +00:00
|
|
|
$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
|
|
|
}
|
|
|
|
|
2008-12-06 09:24:59 +00:00
|
|
|
// vim: et sw=4 sts=4
|