summaryrefslogtreecommitdiff
path: root/tests/URLDetectionTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/URLDetectionTest.php')
-rw-r--r--tests/URLDetectionTest.php28
1 files changed, 26 insertions, 2 deletions
diff --git a/tests/URLDetectionTest.php b/tests/URLDetectionTest.php
index 767f895bb..1c3f7cd96 100644
--- a/tests/URLDetectionTest.php
+++ b/tests/URLDetectionTest.php
@@ -25,14 +25,38 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase
static public function provider()
{
return array(
+ array('not a link :: no way',
+ 'not a link :: no way'),
+ array('link http://www.somesite.com/xyz/35637563@N00/52803365/ link',
+ 'link <a href="http://www.somesite.com/xyz/35637563@N00/52803365/" rel="external">http://www.somesite.com/xyz/35637563@N00/52803365/</a> link'),
array('http://127.0.0.1',
'<a href="http://127.0.0.1/" rel="external">http://127.0.0.1</a>'),
array('127.0.0.1',
'<a href="http://127.0.0.1/" rel="external">127.0.0.1</a>'),
array('127.0.0.1:99',
'<a href="http://127.0.0.1:99/" rel="external">127.0.0.1:99</a>'),
- array('127.0.0.1/test.php',
- '<a href="http://127.0.0.1/test.php" rel="external">127.0.0.1/test.php</a>'),
+ array('127.0.0.1/Name:test.php',
+ '<a href="http://127.0.0.1/Name:test.php" rel="external">127.0.0.1/Name:test.php</a>'),
+ array('127.0.0.1/~test',
+ '<a href="http://127.0.0.1/~test" rel="external">127.0.0.1/~test</a>'),
+ array('127.0.0.1/+test',
+ '<a href="http://127.0.0.1/+test" rel="external">127.0.0.1/+test</a>'),
+ array('127.0.0.1/$test',
+ '<a href="http://127.0.0.1/$test" rel="external">127.0.0.1/$test</a>'),
+ array('127.0.0.1/\'test',
+ '<a href="http://127.0.0.1/\'test" rel="external">127.0.0.1/\'test</a>'),
+ array('127.0.0.1/"test',
+ '<a href="http://127.0.0.1/&quot;test" rel="external">127.0.0.1/&quot;test</a>'),
+ array('127.0.0.1/-test',
+ '<a href="http://127.0.0.1/-test" rel="external">127.0.0.1/-test</a>'),
+ array('127.0.0.1/_test',
+ '<a href="http://127.0.0.1/_test" rel="external">127.0.0.1/_test</a>'),
+ array('127.0.0.1/!test',
+ '<a href="http://127.0.0.1/!test" rel="external">127.0.0.1/!test</a>'),
+ array('127.0.0.1/*test',
+ '<a href="http://127.0.0.1/*test" rel="external">127.0.0.1/*test</a>'),
+ array('127.0.0.1/test%20stuff',
+ '<a href="http://127.0.0.1/test%20stuff" rel="external">127.0.0.1/test%20stuff</a>'),
array('http://[::1]:99/test.php',
'<a href="http://[::1]:99/test.php" rel="external">http://[::1]:99/test.php</a>'),
array('http://::1/test.php',