]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - tests/HashTagDetectionTest.php
Merge branch '0.8.x' into testing
[quix0rs-gnu-social.git] / tests / HashTagDetectionTest.php
index 71137b0b5415e50247975c531b3503ad2a3e4994..9afe346571e10cd1856dabe517a53b45ea724d4f 100644 (file)
@@ -6,7 +6,7 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
 }
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
-define('LACONICA', true);
+define('STATUSNET', true);
 
 require_once INSTALLDIR . '/lib/common.php';
 
@@ -27,8 +27,20 @@ class HashTagDetectionTest extends PHPUnit_Framework_TestCase
         return array(
                      array('hello',
                            'hello'),
-                     array('#hello',
-                           '<a href="/tag/hello">hello</a>'),
+                     array('#hello people',
+                           '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span> people'),
+                     array('"#hello" people',
+                           '&quot;#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>&quot; people'),
+                     array('say "#hello" people',
+                           'say &quot;#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>&quot; people'),
+                     array('say (#hello) people',
+                           'say (#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>) people'),
+                     array('say [#hello] people',
+                           'say [#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>] people'),
+                     array('say {#hello} people',
+                           'say {#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>} people'),
+                     array('say \'#hello\' people',
+                           'say \'#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>\' people'),
                      );
     }
 }