From 7a40f4354b32809af3d0cfd6e3af0eda02ab0e0a Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 12 May 2012 17:57:41 -0700 Subject: some important stuff we'll need --- .../tests/HTMLPurifier/ChildDef/TableTest.php | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 lib/htmlpurifier/tests/HTMLPurifier/ChildDef/TableTest.php (limited to 'lib/htmlpurifier/tests/HTMLPurifier/ChildDef/TableTest.php') diff --git a/lib/htmlpurifier/tests/HTMLPurifier/ChildDef/TableTest.php b/lib/htmlpurifier/tests/HTMLPurifier/ChildDef/TableTest.php new file mode 100644 index 000000000..2f72d187a --- /dev/null +++ b/lib/htmlpurifier/tests/HTMLPurifier/ChildDef/TableTest.php @@ -0,0 +1,75 @@ +obj = new HTMLPurifier_ChildDef_Table(); + } + + function testEmptyInput() { + $this->assertResult('', false); + } + + function testSingleRow() { + $this->assertResult(''); + } + + function testComplexContents() { + $this->assertResult(''. + 'asdf'); + $this->assertResult(''); + } + + function testReorderContents() { + $this->assertResult( + '1', + '1'); + } + + function testXhtml11Illegal() { + $this->assertResult( + 'aa', + 'aa' + ); + } + + function testTrOverflowAndClose() { + $this->assertResult( + 'abcd', + 'abcd' + ); + } + + function testDuplicateProcessing() { + $this->assertResult( + '11', + '11' + ); + } + + function testRemoveText() { + $this->assertResult('foo', false); + } + + function testStickyWhitespaceOnTr() { + $this->config->set('Output.Newline', "\n"); + $this->assertResult("\n \n \n "); + } + + function testStickyWhitespaceOnTSection() { + $this->config->set('Output.Newline', "\n"); + $this->assertResult( + "\n\t\n\t\t\n\t\t\t", + "\n\t\t\n\t\n\t\t\t" + ); + + } + +} + +// vim: et sw=4 sts=4 -- cgit v1.2.3