Support phpunit 7, let travis test PHP 7.2 and 7.1
[grauphel.git] / tests / Lib / Converter / HtmlTest.php
1 <?php
2 require_once __DIR__ . '/../../../lib/converter/base.php';
3 require_once __DIR__ . '/../../../lib/converter/html.php';
4
5 class Lib_Converter_HtmlTest extends \PHPUnit\Framework\TestCase
6 {
7     public function testConvert()
8     {
9         $input = file_get_contents(__DIR__ . '/../../data/formattest.tomboynotecontent');
10
11         $converter = new OCA\Grauphel\Converter\Html();
12         $output = $converter->convert($input);
13         $this->assertEquals(
14             file_get_contents(__DIR__ . '/../../data/formattest.html'),
15             $output
16         );
17     }
18
19     public function testXSS()
20     {
21         $input = file_get_contents(__DIR__ . '/../../data/xss.tomboynotecontent');
22
23         $converter = new OCA\Grauphel\Converter\Html();
24         $output = $converter->convert($input);
25         $this->assertEquals(
26             file_get_contents(__DIR__ . '/../../data/xss.html'),
27             $output
28         );
29     }
30 }
31 ?>