X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FURLDetectionTest.php;h=95d01fb3a9d81062791ea621a20c6cc3aead432b;hb=b53e1439969bfa2c0b551d8cc2fc8fe15652c62a;hp=eac7ba3f5c766032ad14d5d5103793299e5458b0;hpb=60b66bdd6e3bbc083aec6126b8583714dc24b94d;p=quix0rs-gnu-social.git
diff --git a/tests/URLDetectionTest.php b/tests/URLDetectionTest.php
index eac7ba3f5c..95d01fb3a9 100644
--- a/tests/URLDetectionTest.php
+++ b/tests/URLDetectionTest.php
@@ -6,8 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
}
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
-define('STATUSNET', true);
-define('LACONICA', true);
+define('GNUSOCIAL', true);
+define('STATUSNET', true); // compatibility
require_once INSTALLDIR . '/lib/common.php';
@@ -20,6 +20,8 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase
public function testProduction($content, $expected)
{
$rendered = common_render_text($content);
+ // hack!
+ $rendered = preg_replace('/id="attachment-\d+"/', 'id="attachment-XXX"', $rendered);
$this->assertEquals($expected, $rendered);
}
@@ -269,7 +271,13 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase
array('file.html',
'file.html'),
array('file.php',
- 'file.php')
+ 'file.php'),
+
+ // scheme-less HTTP URLs with @ in the path: http://status.net/open-source/issues/2248
+ array('http://flickr.com/photos/34807140@N05/3838905434',
+ 'http://flickr.com/photos/34807140@N05/3838905434'),
+ array('flickr.com/photos/34807140@N05/3838905434',
+ 'flickr.com/photos/34807140@N05/3838905434'),
);
}
}