mirror of
https://github.com/friendica/friendica
synced 2025-05-01 17:04:25 +02:00
Reenable Twitter/Create&Destory tests
This commit is contained in:
parent
204b8b6e49
commit
d9949610c5
4 changed files with 137 additions and 96 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue