From b6aa0ff1c28cf1abadf56d2eed051f97a6e6b0e6 Mon Sep 17 00:00:00 2001 From: Alain Peyrat Date: Wed, 9 Nov 2011 10:03:55 +0000 Subject: [PATCH] Add more unit tests for purify --- tests/unit/utils/TextSanitizerTest.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/unit/utils/TextSanitizerTest.php b/tests/unit/utils/TextSanitizerTest.php index d937a0add0..5bd7ae9e6d 100644 --- a/tests/unit/utils/TextSanitizerTest.php +++ b/tests/unit/utils/TextSanitizerTest.php @@ -46,4 +46,23 @@ class TextSanitizerTests extends PHPUnit_Framework_TestCase { $this->assertEquals('Hacker ', $this->s->purify('Hacker ')); } + + /** + * test purify on other html piece of code. + */ + public function testPurifyOnMiscCode() + { + $in = "\n
> rep > rep
\n
"; + $out = "\n
> rep > rep
\n"; + $this->assertEquals($out, $this->s->purify($in)); + } + + /** + * test purify on other html piece of code. + */ + public function testPurifyOnMiscCode2() + { + $text = 'ceci est une reponse'; + $this->assertEquals($text, $this->s->purify($text)); + } } -- 2.30.2