blob: b02e39c790523605b8a28d06205892e485459508 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php
require_once __DIR__ . '/../../../lib/converter/base.php';
require_once __DIR__ . '/../../../lib/converter/html.php';
class Lib_Converter_HtmlTest extends PHPUnit_Framework_TestCase
{
public function testConvert()
{
$input = file_get_contents(__DIR__ . '/../../data/formattest.tomboynotecontent');
$converter = new OCA\Grauphel\Converter\Html();
$output = $converter->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\Converter\Html();
$output = $converter->convert($input);
$this->assertEquals(
file_get_contents(__DIR__ . '/../../data/xss.html'),
$output
);
}
}
?>
|