- /**
- * 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.
- *
- * @return void
- */
- public function testApiGetUserWithZeroUser()
- {
- self::assertSelfUser(api_get_user(0));
- }
-
- /**
- * Test the api_item_get_user() function.
- *
- * @return void
- */
- public function testApiItemGetUser()
- {
- $users = api_item_get_user($this->app, []);
- self::assertSelfUser($users[0]);
- }
-
- /**
- * Test the api_item_get_user() function with a different item parent.
- *
- * @return void
- */
- public function testApiItemGetUserWithDifferentParent()
- {
- $users = api_item_get_user($this->app, ['thr-parent' => 'item_parent', 'uri' => 'item_uri']);
- self::assertSelfUser($users[0]);
- self::assertEquals($users[0], $users[1]);
- }
-