]> git.mxchange.org Git - friendica.git/commitdiff
ApiTest #6274 #6275
authorroot <17hado.com@gmail.com>
Mon, 17 Dec 2018 14:36:56 +0000 (14:36 +0000)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 21 Jan 2019 14:12:36 +0000 (09:12 -0500)
tests/include/ApiTest.php

index 458d98599a4e29ea228307fbd8a82793918ef779..210dc4e7443a36c8e0fe506066575b54b7ce790e 100644 (file)
@@ -1405,6 +1405,19 @@ class ApiTest extends DatabaseTest
                }
        }
 
+       /**
+        * Test the api_search() function with an q parameter contains hashtag.
+        * @return void
+        */
+       public function testApiSearchWithHashtag()
+       {
+               $_REQUEST['q'] = '#friendica';
+               $result = api_search('json');
+               foreach ($result['status'] as $status) {
+                       $this->assertStatus($status);
+                       $this->assertContains('#friendica', $status['text'], null, true);
+               }
+       }
 
        /**
         * Test the api_search() function without an authenticated user.