예제 #1
0
 public function testChampionsAttachResponse()
 {
     $this->client->shouldReceive('baseUrl')->with('https://na.api.pvp.net/api/lol/na/')->once();
     $this->client->shouldReceive('baseUrl')->with('https://na.api.pvp.net/championmastery/location/NA1/')->once();
     $this->client->shouldReceive('request')->with('player/74602/champions', ['api_key' => 'key'])->once()->andReturn(file_get_contents('tests/Json/championmastery.30447079.topcount3.json'));
     $this->client->shouldReceive('request')->with('v1.4/summoner/by-name/bakasan', ['api_key' => 'key'])->once()->andReturn(file_get_contents('tests/Json/summoner.bakasan.json'));
     $api = new Api('key', $this->client);
     $bakasan = $api->summoner()->info('bakasan');
     $api->championMastery()->champions($bakasan);
     $this->assertTrue($bakasan->championmastery instanceof \LeagueWrap\Dto\ChampionMasteryList);
 }
예제 #2
0
 public function testChampionMastery()
 {
     $api = new Api('key');
     $championMastery = $api->championMastery();
     $this->assertTrue($championMastery instanceof Leaguewrap\Api\ChampionMastery);
 }