Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
038400fe
Commit
038400fe
authored
Apr 01, 2016
by
Carsten Rose
Browse files
Link.php: refactore Link() to be reentrand.
parent
6b206711
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/report/Link.php
View file @
038400fe
This diff is collapsed.
Click to expand it.
extension/qfq/tests/phpunit/LinkTest.php
View file @
038400fe
...
...
@@ -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
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment