public function testLazyLoadingIssues() { $expectedResponse = json_encode($this->loadJsonFixture('fixture_issues.json')); $this->mockSimpleRequest($this->httpClient, 'get', $expectedResponse, 'https://api.github.com/repos/octocat/Hello-World/issues'); $repository = new Repository($this->httpClient); $repository->populate($this->loadJsonFixture('fixture_repository.json')); foreach ($repository->getIssues() as $issue) { $this->assertInstanceOf(Issue::CLASS_NAME, $issue); } }