3 namespace Friendica\Test\src\Module\Api\Twitter\Users;
5 use Friendica\App\Router;
7 use Friendica\Module\Api\Twitter\Users\Lookup;
8 use Friendica\Network\HTTPException\NotFoundException;
9 use Friendica\Test\src\Module\Api\ApiTest;
11 class LookupTest extends ApiTest
14 * Test the api_users_lookup() function.
18 public function testApiUsersLookup()
20 $this->expectException(NotFoundException::class);
22 $lookup = new Lookup(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), ['REQUEST_METHOD' => Router::GET]);
27 * Test the api_users_lookup() function with an user ID.
31 public function testApiUsersLookupWithUserId()
33 $lookup = new Lookup(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), ['REQUEST_METHOD' => Router::GET]);
34 $respone = $lookup->run(['user_id' => static::OTHER_USER['id']]);
36 $json = $this->toJson($respone);
38 self::assertOtherUser($json[0]);