$statuses = Item::select(api_user(), [], $condition, $params);
/// @TODO How about copying this to above methods which don't check $r ?
- if (!DBM::is_result($items)) {
+ if (!DBM::is_result($statuses)) {
throw new BadRequestException("There is no status with this id.");
}
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
$statuses = Item::select(api_user(), [], $condition, $params);
- if (!DBM::is_result($items)) {
+ if (!DBM::is_result($statuses)) {
throw new BadRequestException("There is no status with id $id.");
}
$this->app->argv[1] = '1.1';
$this->app->argv[3] = 'create';
$this->app->argc = 10;
- $_REQUEST['id'] = 1;
+ $_REQUEST['id'] = 3;
$result = api_favorites_create_destroy('json');
$this->assertStatus($result['status']);
}
$this->app->argv[1] = '1.1';
$this->app->argv[3] = 'create';
$this->app->argc = 10;
- $_REQUEST['id'] = 1;
+ $_REQUEST['id'] = 3;
$result = api_favorites_create_destroy('rss');
$this->assertXml($result, 'status');
}
$this->app->argv[1] = '1.1';
$this->app->argv[3] = 'destroy';
$this->app->argc = 10;
- $_REQUEST['id'] = 1;
+ $_REQUEST['id'] = 3;
$result = api_favorites_create_destroy('json');
$this->assertStatus($result['status']);
}