From 8ee6bfe97633d31c6b89cebbc434837eca04d6dd Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 23 Oct 2014 23:07:01 +0200 Subject: note preview --- tests/Lib/Converter/HtmlTest.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/Lib/Converter/HtmlTest.php (limited to 'tests/Lib/Converter/HtmlTest.php') diff --git a/tests/Lib/Converter/HtmlTest.php b/tests/Lib/Converter/HtmlTest.php new file mode 100644 index 0000000..0a66ee4 --- /dev/null +++ b/tests/Lib/Converter/HtmlTest.php @@ -0,0 +1,30 @@ +convert($input); + $this->assertEquals( + file_get_contents(__DIR__ . '/../../data/formattest.html'), + $output + ); + } + + public function testXSS() + { + $input = file_get_contents(__DIR__ . '/../../data/xss.tomboynotecontent'); + + $converter = new OCA\Grauphel\Lib\Converter\Html(); + $output = $converter->convert($input); + $this->assertEquals( + file_get_contents(__DIR__ . '/../../data/xss.html'), + $output + ); + } +} +?> \ No newline at end of file -- cgit v1.2.3