added controller to render markdown documentation #129

This commit is contained in:
Kevin Papst
2018-02-07 15:07:53 +01:00
parent 2e60e14132
commit 29699572bd
25 changed files with 658 additions and 140 deletions

View File

@@ -0,0 +1,27 @@
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Tests\Utils;
use App\Utils\Markdown;
use \PHPUnit\Framework\TestCase;
/**
* @covers \App\Utils\Markdown
*/
class MarkdownTest extends TestCase
{
public function testMarkdownToHtml()
{
$sut = new Markdown();
$this->assertEquals('<p><em>test</em></p>', $sut->toHtml('*test*'));
$this->assertEquals('<h1>foobar</h1>', $sut->toHtml('# foobar'));
}
}