mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 08:21:52 +00:00
Generalize custom test to use non-existent items. Table unit test was disabled (to be reused for table test).
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@415 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
49b3832ebf
commit
69747ede8a
@ -42,9 +42,29 @@ class HTMLPurifier_ChildDefTest extends UnitTestCase
|
|||||||
|
|
||||||
function test_custom() {
|
function test_custom() {
|
||||||
|
|
||||||
// the table definition
|
|
||||||
$this->def = new HTMLPurifier_ChildDef_Custom(
|
$this->def = new HTMLPurifier_ChildDef_Custom(
|
||||||
'(caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))');
|
'(a, b?, c*, d+, (a, b)*)');
|
||||||
|
|
||||||
|
$inputs[0] = '';
|
||||||
|
$expect[0] = false;
|
||||||
|
|
||||||
|
$inputs[1] = '<a /><b /><c /><d /><a /><b />';
|
||||||
|
$expect[1] = true;
|
||||||
|
|
||||||
|
$inputs[2] = '<a /><d>Dob</d><a /><b>foo</b><a href="moo"><b>foo</b>';
|
||||||
|
$expect[2] = true;
|
||||||
|
|
||||||
|
$inputs[3] = '<a /><a />';
|
||||||
|
$expect[3] = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function atest_table() {
|
||||||
|
|
||||||
|
// currently inactive, awaiting augmentation
|
||||||
|
|
||||||
|
// the table definition
|
||||||
|
$this->def = new HTMLPurifier_ChildDef_Table();
|
||||||
|
|
||||||
$inputs = $expect = $config = array();
|
$inputs = $expect = $config = array();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user