]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - tests/HashTagDetectionTests.php
Removed plugin Google-Analytics as this is free/libre and decentralized
[quix0rs-gnu-social.git] / tests / HashTagDetectionTests.php
index 483d7135e1592b2e9656d037b12fa130b667f695..1fbc98983d66ab09a400b45990c9794103bf000f 100644 (file)
@@ -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';
 
@@ -42,6 +42,21 @@ class HashTagDetectionTests extends PHPUnit_Framework_TestCase
                            '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'),
+
+                     // Unicode legit letters
+                     array('#éclair yummy',
+                           '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('éclair'))) . '" rel="tag">éclair</a></span> yummy'),
+                     array('#维基百科 zh.wikipedia!',
+                           '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('维基百科'))) . '" rel="tag">维基百科</a></span> zh.wikipedia!'),
+                     array('#Россия russia',
+                           '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('Россия'))) . '" rel="tag">Россия</a></span> russia'),
+
+                     // Unicode punctuators -- the ideographic "," separates the tag, just as "," does
+                     array('#维基百科,zh.wikipedia!',
+                           '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('维基百科'))) . '" rel="tag">维基百科</a></span>,zh.wikipedia!'),
+                     array('#维基百科,zh.wikipedia!',
+                           '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('维基百科'))) . '" rel="tag">维基百科</a></span>,zh.wikipedia!'),
+
                      );
     }
 }