From 69747ede8a184058625ad2ec2ae60bf9d27b7c09 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Wed, 13 Sep 2006 02:11:09 +0000 Subject: [PATCH] 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 --- tests/HTMLPurifier/ChildDefTest.php | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tests/HTMLPurifier/ChildDefTest.php b/tests/HTMLPurifier/ChildDefTest.php index 228898fa..7420f72d 100644 --- a/tests/HTMLPurifier/ChildDefTest.php +++ b/tests/HTMLPurifier/ChildDefTest.php @@ -42,9 +42,29 @@ class HTMLPurifier_ChildDefTest extends UnitTestCase function test_custom() { - // the table definition $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] = ''; + $expect[1] = true; + + $inputs[2] = 'Dobfoofoo'; + $expect[2] = true; + + $inputs[3] = ''; + $expect[3] = false; + + } + + function atest_table() { + + // currently inactive, awaiting augmentation + + // the table definition + $this->def = new HTMLPurifier_ChildDef_Table(); $inputs = $expect = $config = array();