예제 #1
0
 public function testTimelineFrame()
 {
     $this->client->shouldReceive('baseUrl')->once();
     $this->client->shouldReceive('request')->with('na/v2.2/match/1399898747', ['api_key' => 'key', 'includeTimeline' => true])->once()->andReturn(file_get_contents('tests/Json/matchhistory.match.1399898747.timeline.json'));
     $api = new Api('key', $this->client);
     $match = $api->match()->match(1399898747, true);
     $frame = $match->timeline->frames[1];
     $this->assertTrue($frame instanceof LeagueWrap\Dto\TimelineFrame);
     $this->assertTrue($frame->participantFrame(1) instanceof LeagueWrap\Dto\TimelineParticipantFrame);
     $this->assertTrue($frame->events[0] instanceof LeagueWrap\Dto\TimelineFrameEvent);
 }
예제 #2
0
 public function testMatch()
 {
     $api = new Api('key');
     $match = $api->match();
     $this->assertTrue($match instanceof LeagueWrap\Api\Match);
 }