|
@@ 54-66 (lines=13) @@
|
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
/** @test */ |
| 54 |
|
public function it_gets_the_owned_games_by_user_id() |
| 55 |
|
{ |
| 56 |
|
$games = $this->steamClient->player($this->id64)->GetOwnedGames(); |
| 57 |
|
|
| 58 |
|
$this->assertInstanceOf('Illuminate\Support\Collection', $games); |
| 59 |
|
$this->assertInstanceOf('Syntax\SteamApi\Containers\Game', $games->first()); |
| 60 |
|
|
| 61 |
|
$attributes = [ |
| 62 |
|
'appId', 'name', 'playtimeTwoWeeks', 'playtimeTwoWeeksReadable', 'playtimeForever', 'playtimeForeverReadable', |
| 63 |
|
'icon', 'logo', 'header', 'hasCommunityVisibleStats' |
| 64 |
|
]; |
| 65 |
|
$this->assertObjectHasAttributes($attributes, $games->first()); |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
/** @test */ |
| 69 |
|
public function it_gets_the_owned_games_by_user_id_without_app_details() |
|
@@ 104-116 (lines=13) @@
|
| 101 |
|
} |
| 102 |
|
|
| 103 |
|
/** @test */ |
| 104 |
|
public function it_gets_recently_played_games_by_user_id() |
| 105 |
|
{ |
| 106 |
|
$games = $this->steamClient->player($this->id64)->GetRecentlyPlayedGames(); |
| 107 |
|
|
| 108 |
|
$this->assertInstanceOf('Illuminate\Support\Collection', $games); |
| 109 |
|
$this->assertInstanceOf('Syntax\SteamApi\Containers\Game', $games->first()); |
| 110 |
|
|
| 111 |
|
$attributes = [ |
| 112 |
|
'appId', 'name', 'playtimeTwoWeeks', 'playtimeTwoWeeksReadable', 'playtimeForever', 'playtimeForeverReadable', |
| 113 |
|
'icon', 'logo', 'header', 'hasCommunityVisibleStats' |
| 114 |
|
]; |
| 115 |
|
$this->assertObjectHasAttributes($attributes, $games->first()); |
| 116 |
|
} |
| 117 |
|
|
| 118 |
|
/** @test */ |
| 119 |
|
public function it_gets_a_single_recently_played_game_by_user_id() |