blob: 7af71d793a64b912c97b2af1f0a67b4fbf69b932 (
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
);
}
}
?>
|