summaryrefslogtreecommitdiff
path: root/tests/units/HelperTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/HelperTest.php')
-rw-r--r--tests/units/HelperTest.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/units/HelperTest.php b/tests/units/HelperTest.php
new file mode 100644
index 00000000..72f84a24
--- /dev/null
+++ b/tests/units/HelperTest.php
@@ -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')))
+ );
+ }
+}