public function testFree() { $this->client->shouldReceive('baseUrl')->once(); $this->client->shouldReceive('request')->with('v1.2/champion', ['freeToPlay' => 'true', 'api_key' => 'key'])->once()->andReturn(file_get_contents('tests/Json/champion.free.json')); Api::setKey('key', $this->client); $free = Champion::free(); $this->assertEquals(10, count($free->champions)); }