]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - tests/HashTagDetectionTests.php
AtomPub tetss: confirming edit URL linked properly in individual entry return
[quix0rs-gnu-social.git] / tests / HashTagDetectionTests.php
index 4f0b31b0df054749c21e393300a989e924ce76bf..483d7135e1592b2e9656d037b12fa130b667f695 100644 (file)
@@ -6,6 +6,7 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
 }
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
+define('STATUSNET', true);
 define('LACONICA', true);
 
 require_once INSTALLDIR . '/lib/common.php';
@@ -27,8 +28,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'),
                      );
     }
 }