Add more unit tests

This commit is contained in:
Frédéric Guillot
2014-12-28 14:37:06 -05:00
parent 91a99c5e6d
commit bcbc1b78c6
2 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
require_once __DIR__.'/Base.php';
use Core\Helper;
class HelperTest extends Base
{
public function testMarkdown()
{
$h = new Helper($this->container);
$this->assertEquals('<p>Test</p>', $h->markdown('Test'));
$this->assertEquals(
'<p>Task <a href="?controller=task&amp;action=show&amp;task_id=123" class="" title="" >#123</a></p>',
$h->markdown('Task #123')
);
$this->assertEquals(
'<p>Task <a href="?controller=a&amp;action=b&amp;c=d&amp;task_id=123" class="" title="" >#123</a></p>',
$h->markdown('Task #123', array('controller' => 'a', 'action' => 'b', 'params' => array('c' => 'd')))
);
}
}