Removed "api_get_user"

This commit is contained in:
Michael 2021-11-18 22:20:19 +00:00
commit 8fd738f550
3 changed files with 20 additions and 155 deletions

View file

@ -378,37 +378,6 @@ class ApiTest extends FixtureTest
BasicAuth::getCurrentUserID(true);
}
/**
* Test the api_check_method() function.
*
* @return void
*/
public function testApiCheckMethod()
{
self::assertFalse(api_check_method('method'));
}
/**
* Test the api_check_method() function with a correct method.
*
* @return void
*/
public function testApiCheckMethodWithCorrectMethod()
{
$_SERVER['REQUEST_METHOD'] = 'method';
self::assertTrue(api_check_method('method'));
}
/**
* Test the api_check_method() function with a wildcard.
*
* @return void
*/
public function testApiCheckMethodWithWildcard()
{
self::assertTrue(api_check_method('*'));
}
/**
* Test the api_call() function.
*
@ -784,27 +753,6 @@ class ApiTest extends FixtureTest
// self::assertSelfUser(api_get_user());
}
/**
* Test the api_get_user() function with a valid user.
*
* @return void
*/
public function testApiGetUserWithCorrectUser()
{
self::assertOtherUser(api_get_user($this->otherUser['id']));
}
/**
* Test the api_get_user() function with a wrong user ID.
*
* @return void
*/
public function testApiGetUserWithWrongUser()
{
$this->expectException(\Friendica\Network\HTTPException\BadRequestException::class);
self::assertOtherUser(api_get_user($this->wrongUserId));
}
/**
* Test the api_get_user() function with a 0 user ID.
*