0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-24 17:21:52 +00:00
htmlpurifier/tests/HTMLPurifier/AttrDef/CSS/MultipleTest.php

28 lines
705 B
PHP
Raw Normal View History

<?php
// borrowed for the sakes of this test
class HTMLPurifier_AttrDef_CSS_MultipleTest extends HTMLPurifier_AttrDefHarness
{
function test() {
$this->def = new HTMLPurifier_AttrDef_CSS_Multiple(
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');
}
}