Commit 038400fe authored by Carsten  Rose's avatar Carsten Rose
Browse files

Link.php: refactore Link() to be reentrand.

parent 6b206711
This diff is collapsed.
......@@ -28,8 +28,21 @@ class LinkTest extends \PHPUnit_Framework_TestCase {
public function testLinkSingle() {
$link = new Link(null, $this->sip, true);
$result = $link->renderLink('');
$this->assertEquals($result, '');
$result = $link->renderLink('u');
$this->assertEquals($result, '');
$result = $link->renderLink('u:');
$this->assertEquals($result, '');
$result = $link->renderLink('u:http://math.uzh.ch');
$this->assertEquals($result, '<a href="http://math.uzh.ch" > </a>');
$result = $link->renderLink('u:http://math.uzh.ch|t:Hello world');
$this->assertEquals($result, '<a href="http://math.uzh.ch" >Hello World</a>');
}
public function testLinkClass() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment