Add more unit tests
This commit is contained in:
25
tests/units/HelperTest.php
Normal file
25
tests/units/HelperTest.php
Normal 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&action=show&task_id=123" class="" title="" >#123</a></p>',
|
||||
$h->markdown('Task #123')
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'<p>Task <a href="?controller=a&action=b&c=d&task_id=123" class="" title="" >#123</a></p>',
|
||||
$h->markdown('Task #123', array('controller' => 'a', 'action' => 'b', 'params' => array('c' => 'd')))
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user