Beispiel #1
0
 public function testRankedArrayAccessSeason()
 {
     $this->client->shouldReceive('baseUrl')->with('https://na.api.pvp.net/api/lol/na/')->once();
     $this->client->shouldReceive('request')->with('v1.3/stats/by-summoner/74602/ranked', ['api_key' => 'key', 'season' => 3])->once()->andReturn(file_get_contents('tests/Json/stats.ranked.74602.season4.json'));
     $api = new Api('key', $this->client);
     $stats = $api->stats();
     $stats->setSeason(3);
     $stats = $stats->ranked(74602);
     $this->assertTrue($stats[0] instanceof LeagueWrap\Dto\ChampionStats);
 }
Beispiel #2
0
 public function testStats()
 {
     $api = new Api('key');
     $stats = $api->stats();
     $this->assertTrue($stats instanceof LeagueWrap\Api\Stats);
 }