Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function testUser() |
||
13 | { |
||
14 | $data = file_get_contents(__DIR__ . '/data/user.json'); |
||
15 | $response = new GuzzleHttp\Psr7\Response(200, [], $data); |
||
16 | $mock = new GuzzleHttp\Handler\MockHandler([ $response, $response ]); |
||
17 | |||
18 | $client = new SleeperClient($mock); |
||
19 | |||
20 | $user = (object) $client->users()->find('2ksports'); |
||
|
|||
21 | |||
22 | $this->assertIsObject($user); |
||
23 | $this->assertEquals('457511950237696', $user->user_id); |
||
24 | $this->assertEquals('2ksports', $user->username); |
||
25 | $this->assertEquals('2KSports', $user->display_name); |
||
26 | } |
||
29 |