]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - tests/HashTagDetectionTests.php
Merge branch '0.9.x' of git@gitorious.org:laconica/mainline into 0.9.x
[quix0rs-gnu-social.git] / tests / HashTagDetectionTests.php
index 4f0b31b0df054749c21e393300a989e924ce76bf..aeac4a5e3f6c932ac0e26a24b2c5610ed3999de1 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 HashTagDetectionTests extends PHPUnit_Framework_TestCase
         return array(
                      array('hello',
                            'hello'),
-                     array('#hello',
-                           '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>'),
+                     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'),
                      );
     }
 }