Testing the query

2022.09-rc
Michael 2021-02-05 06:23:34 +00:00
rodzic 239bf686af
commit 289923a17c
2 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -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);

Wyświetl plik

@ -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);
}