2006-08-06 01:41:18 +00:00
|
|
|
<?php
|
|
|
|
|
2007-02-14 20:38:51 +00:00
|
|
|
class HTMLPurifier_AttrDef_HTML_MultiLengthTest extends HTMLPurifier_AttrDef_HTML_LengthTest
|
2006-08-06 01:41:18 +00:00
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2013-07-16 11:56:14 +00:00
|
|
|
public function setup()
|
|
|
|
{
|
2007-02-14 20:38:51 +00:00
|
|
|
$this->def = new HTMLPurifier_AttrDef_HTML_MultiLength();
|
2006-08-06 01:41:18 +00:00
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2013-07-16 11:56:14 +00:00
|
|
|
public function test()
|
|
|
|
{
|
2006-08-06 01:41:18 +00:00
|
|
|
// length check
|
|
|
|
parent::test();
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-08-06 01:41:18 +00:00
|
|
|
$this->assertDef('*');
|
2007-02-14 20:38:51 +00:00
|
|
|
$this->assertDef('1*', '*');
|
2006-08-06 01:41:18 +00:00
|
|
|
$this->assertDef('56*');
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-08-06 01:41:18 +00:00
|
|
|
$this->assertDef('**', false); // plain old bad
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-08-06 01:41:18 +00:00
|
|
|
$this->assertDef('5.4*', '5*'); // no decimals
|
|
|
|
$this->assertDef('-3*', false); // no negatives
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-08-06 01:41:18 +00:00
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-08-06 01:41:18 +00:00
|
|
|
}
|
|
|
|
|
2008-12-06 09:24:59 +00:00
|
|
|
// vim: et sw=4 sts=4
|