public function testGetUser() { $expected = new User(); $response = $this->getMock(ResponseInterface::class); $this->http->expects($this->any())->method('get')->with('/v2/users/USER_ID', ['foo' => 'bar'])->willReturn($response); $this->mapper->expects($this->any())->method('toUser')->with($response)->willReturn($expected); $actual = $this->client->getUser('USER_ID', ['foo' => 'bar']); $this->assertSame($expected, $actual); }
public function testGetUser() { $user = $this->client->getCurrentUser(); $user = $this->client->getUser($user->getId()); $this->assertInstanceOf(User::class, $user); $this->assertNotEmpty($user->getId()); }