APIs show number of comments
- /api/statuses/*_timeline
- /api/search
- /api/favorites

/api/search enhacement
- support exclude_replies parameter
This commit is contained in:
root 2018-12-21 16:00:56 +00:00 committed by Hypolite Petovan
commit 61afd5b3fb
3 changed files with 67 additions and 2 deletions

View file

@ -1419,6 +1419,20 @@ class ApiTest extends DatabaseTest
}
}
/**
* Test the api_search() function with an exclude_replies parameter.
* @return void
*/
public function testApiSearchWithExcludeReplies()
{
$_REQUEST['max_id'] = 10;
$_REQUEST['exclude_replies'] = true;
$result = api_search('json');
foreach ($result['status'] as $status) {
$this->assertStatus($status);
}
}
/**
* Test the api_search() function without an authenticated user.
* @return void