Testing the query
This commit is contained in:
parent
239bf686af
commit
289923a17c
2 changed files with 5 additions and 4 deletions
|
@ -1819,9 +1819,10 @@ function api_statuses_networkpublic_timeline($type)
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
|
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
|
||||||
// $statuses = Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
|
$statuses = Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
|
||||||
$statuses = Post::select(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);
|
$ret = api_format_items(Post::toArray($statuses), $user_info, false, $type);
|
||||||
|
|
||||||
bindComments($ret);
|
bindComments($ret);
|
||||||
|
|
|
@ -1746,7 +1746,7 @@ class ApiTest extends FixtureTest
|
||||||
{
|
{
|
||||||
$_REQUEST['page'] = -2;
|
$_REQUEST['page'] = -2;
|
||||||
$result = api_statuses_networkpublic_timeline('json');
|
$result = api_statuses_networkpublic_timeline('json');
|
||||||
self::assertNotEmpty($result['status']);
|
self::assertNotEmpty($result['status'], var_export($result, true));
|
||||||
foreach ($result['status'] as $status) {
|
foreach ($result['status'] as $status) {
|
||||||
self::assertStatus($status);
|
self::assertStatus($status);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue