From 9c90cf7caf57dd8aa6635c2218ff1be7f3b7d5d2 Mon Sep 17 00:00:00 2001 From: root <17hado.com@gmail.com> Date: Mon, 17 Dec 2018 14:36:56 +0000 Subject: [PATCH] ApiTest #6274 #6275 --- tests/include/ApiTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/include/ApiTest.php b/tests/include/ApiTest.php index 458d98599..210dc4e74 100644 --- a/tests/include/ApiTest.php +++ b/tests/include/ApiTest.php @@ -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.