]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - tests/URLDetectionTest.php
ftps protocol should be handled the same way as ftp
[quix0rs-gnu-social.git] / tests / URLDetectionTest.php
index ed29dc88eaf283bf5873a3326a96e59925f211f2..e69f1a2c384e06548ac71480c293b6db55d9c7b3 100644 (file)
@@ -28,27 +28,27 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase
                      array('example',
                            'example'),
                      array('http://example',
-                           'http://example'),
+                           '<a href="http://example/" rel="external">http://example</a>'),
                      array('http://example/',
-                           'http://example/'),
+                           '<a href="http://example/" rel="external">http://example/</a>'),
                      array('http://example/path',
-                           'http://example/path'),
+                           '<a href="http://example/path" rel="external">http://example/path</a>'),
                      array('http://example.com',
-                           '<a href="http://example.com" rel="external">http://example.com</a>'),
+                           '<a href="http://example.com/" rel="external">http://example.com</a>'),
                      array('https://example.com',
-                           '<a href="https://example.com" rel="external">https://example.com</a>'),
+                           '<a href="https://example.com/" rel="external">https://example.com</a>'),
                      array('ftp://example.com',
-                           '<a href="ftp://example.com" rel="external">ftp://example.com</a>'),
+                           '<a href="ftp://example.com/" rel="external">ftp://example.com</a>'),
                      array('ftps://example.com',
-                           '<a href="ftps://example.com" rel="external">ftps://example.com</a>'),
+                           '<a href="ftps://example.com/" rel="external">ftps://example.com</a>'),
                      array('http://user@example.com',
-                           '<a href="http://user@example.com" rel="external">http://user@example.com</a>'),
+                           '<a href="http://user@example.com/" rel="external">http://user@example.com</a>'),
                      array('http://user:pass@example.com',
-                           '<a href="http://user:pass@example.com" rel="external">http://user:pass@example.com</a>'),
+                           '<a href="http://user:pass@example.com/" rel="external">http://user:pass@example.com</a>'),
                      array('http://example.com:8080',
-                           '<a href="http://example.com:8080" rel="external">http://example.com:8080</a>'),
+                           '<a href="http://example.com:8080/" rel="external">http://example.com:8080</a>'),
                      array('http://www.example.com',
-                           '<a href="http://www.example.com" rel="external">http://www.example.com</a>'),
+                           '<a href="http://www.example.com/" rel="external">http://www.example.com</a>'),
                      array('http://example.com/',
                            '<a href="http://example.com/" rel="external">http://example.com/</a>'),
                      array('http://example.com/path',
@@ -58,7 +58,7 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase
                      array('http://example.com/path.html#fragment',
                            '<a href="http://example.com/path.html#fragment" rel="external">http://example.com/path.html#fragment</a>'),
                      array('http://example.com/path.php?foo=bar&bar=foo',
-                           '<a href="http://example.com/path.php?foo=bar&bar=foo" rel="external">http://example.com/path.php?foo=bar&bar=foo</a>'),
+                           '<a href="http://example.com/path.php?foo=bar&amp;bar=foo" rel="external">http://example.com/path.php?foo=bar&amp;bar=foo</a>'),
                      array('http://müllärör.de',
                            '<a href="http://müllärör.de" rel="external">http://müllärör.de</a>'),
                      array('http://ﺱﺲﺷ.com',