public function testGetUser() { $config = (include 'config-test.php'); $client = new Client($config); $mockBody = Stream::factory(json_encode(['email' => "*****@*****.**", "firstName" => "test", "lastName" => "user", "locale" => "en_US", "timeZone" => "US/Pacific", "id" => 3381623543621508])); $mock = new Mock([new Response(200, [], $mockBody)]); // Add the mock subscriber to the client. $client->getHttpClient()->getEmitter()->attach($mock); // Call get user and make sure we get back the user we expect from mock $user = $client->getUser(['id' => 3381623543621508]); $this->assertEquals(3381623543621508, $user['id']); }