Reenable Twitter/Create&Destory tests

This commit is contained in:
Philipp 2021-12-09 22:30:35 +01:00
parent 204b8b6e49
commit d9949610c5
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
4 changed files with 137 additions and 96 deletions

View file

@ -876,100 +876,6 @@ class ApiTest extends FixtureTest
// self::assertStatus($result['status']);
}
/**
* Test the api_favorites_create_destroy() function.
*
* @return void
*/
public function testApiFavoritesCreateDestroy()
{
// $this->expectException(\Friendica\Network\HTTPException\BadRequestException::class);
// DI::args()->setArgv(['api', '1.1', 'favorites', 'create']);
// api_favorites_create_destroy('json');
}
/**
* Test the api_favorites_create_destroy() function with an invalid ID.
*
* @return void
*/
public function testApiFavoritesCreateDestroyWithInvalidId()
{
// $this->expectException(\Friendica\Network\HTTPException\BadRequestException::class);
// DI::args()->setArgv(['api', '1.1', 'favorites', 'create', '12.json']);
// api_favorites_create_destroy('json');
}
/**
* Test the api_favorites_create_destroy() function with an invalid action.
*
* @return void
*/
public function testApiFavoritesCreateDestroyWithInvalidAction()
{
// $this->expectException(\Friendica\Network\HTTPException\BadRequestException::class);
// DI::args()->setArgv(['api', '1.1', 'favorites', 'change.json']);
// $_REQUEST['id'] = 1;
// api_favorites_create_destroy('json');
}
/**
* Test the api_favorites_create_destroy() function with the create action.
*
* @return void
*/
public function testApiFavoritesCreateDestroyWithCreateAction()
{
// DI::args()->setArgv(['api', '1.1', 'favorites', 'create.json']);
// $_REQUEST['id'] = 3;
// $result = api_favorites_create_destroy('json');
// self::assertStatus($result['status']);
}
/**
* Test the api_favorites_create_destroy() function with the create action and an RSS result.
*
* @return void
*/
public function testApiFavoritesCreateDestroyWithCreateActionAndRss()
{
// DI::args()->setArgv(['api', '1.1', 'favorites', 'create.rss']);
// $_REQUEST['id'] = 3;
// $result = api_favorites_create_destroy('rss');
// self::assertXml($result, 'status');
}
/**
* Test the api_favorites_create_destroy() function with the destroy action.
*
* @return void
*/
public function testApiFavoritesCreateDestroyWithDestroyAction()
{
// DI::args()->setArgv(['api', '1.1', 'favorites', 'destroy.json']);
// $_REQUEST['id'] = 3;
// $result = api_favorites_create_destroy('json');
// self::assertStatus($result['status']);
}
/**
* Test the api_favorites_create_destroy() function without an authenticated user.
*
* @return void
*/
public function testApiFavoritesCreateDestroyWithoutAuthenticatedUser()
{
/*
$this->expectException(\Friendica\Network\HTTPException\UnauthorizedException::class);
DI::args()->setArgv(['api', '1.1', 'favorites', 'create.json']);
BasicAuth::setCurrentUserID();
$_SESSION['authenticated'] = false;
api_favorites_create_destroy('json');
*/
}
/**
* Test the api_format_messages() function.
*