0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-25 01:31:53 +00:00
htmlpurifier/tests/HTMLPurifier/AttrDef/MultipleTest.php
Edward Z. Yang 9b375fdfb8 [1.4.0] Added convenient single test selector form on test runner
- Also fixed includes in test files
- Updated TODO with CSS plans

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@659 48356398-32a2-884e-a903-53898d9a118a
2007-01-19 23:02:28 +00:00

33 lines
848 B
PHP

<?php
require_once 'HTMLPurifier/AttrDef/Multiple.php';
require_once 'HTMLPurifier/AttrDefHarness.php';
// borrowed for the sakes of this test
require_once 'HTMLPurifier/AttrDef/Integer.php';
class HTMLPurifier_AttrDef_MultipleTest extends HTMLPurifier_AttrDefHarness
{
function test() {
$this->def = new HTMLPurifier_AttrDef_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');
}
}
?>