Testing the query

This commit is contained in:
Michael 2021-02-05 06:23:34 +00:00
parent 239bf686af
commit 289923a17c
2 changed files with 5 additions and 4 deletions

View File

@ -1819,9 +1819,10 @@ function api_statuses_networkpublic_timeline($type)
}
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
// $statuses = Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
$statuses = Post::select(Item::DISPLAY_FIELDLIST, $condition, $params);
$statuses = Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
if (empty($statuses)) {
return ['test' => $statuses, 'condition' => $condition, 'params' => $params, 'db' => DBA::errorNo(), 'msg' => DBA::errorMessage()];
}
$ret = api_format_items(Post::toArray($statuses), $user_info, false, $type);
bindComments($ret);

View File

@ -1746,7 +1746,7 @@ class ApiTest extends FixtureTest
{
$_REQUEST['page'] = -2;
$result = api_statuses_networkpublic_timeline('json');
self::assertNotEmpty($result['status']);
self::assertNotEmpty($result['status'], var_export($result, true));
foreach ($result['status'] as $status) {
self::assertStatus($status);
}