2006-08-16 00:34:37 +00:00
|
|
|
<?php
|
|
|
|
|
2007-01-19 23:02:28 +00:00
|
|
|
// borrowed for the sakes of this test
|
2007-02-14 20:38:51 +00:00
|
|
|
class HTMLPurifier_AttrDef_CSS_MultipleTest extends HTMLPurifier_AttrDefHarness
|
2006-08-16 00:34:37 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
function test() {
|
2007-02-14 20:38:51 +00:00
|
|
|
$this->def = new HTMLPurifier_AttrDef_CSS_Multiple(
|
2006-08-16 00:34:37 +00:00
|
|
|
new HTMLPurifier_AttrDef_Integer()
|
|
|
|
);
|
|
|
|
|
|
|
|
$this->assertDef('1 2 3 4');
|
|
|
|
$this->assertDef('6');
|
|
|
|
$this->assertDef('4 5');
|
|
|
|
$this->assertDef(' 2 54 2 3', '2 54 2 3');
|
|
|
|
$this->assertDef("6\r3", '6 3');
|
|
|
|
|
|
|
|
$this->assertDef('asdf', false);
|
|
|
|
$this->assertDef('a s d f', false);
|
|
|
|
$this->assertDef('1 2 3 4 5', '1 2 3 4');
|
|
|
|
$this->assertDef('1 2 invalid 3', '1 2 3');
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|