public function testCreateFromCommits()
 {
     $changeFactory = new ChangeFactory();
     $commit = json_decode(file_get_contents('tests/data/commit.json'), true);
     $expectedChangeList = new ChangeList([new Change($commit['commit']['message'])]);
     $changeListFactory = new ChangeListFactory($changeFactory);
     $actualChangeList = $changeListFactory->createFromCommits([$commit]);
     $this->assertEquals($expectedChangeList, $actualChangeList);
 }
 private function _getChangesInRange(GithubClient $client, $startCommitish, $endCommitish, callable $changePrompter = null)
 {
     $commitGraph = new GithubCommitGraph($client->getCommitsInRange($startCommitish, $endCommitish));
     $leadingCommits = $commitGraph->firstParents();
     $changeListFactory = new ChangeListFactory(new ChangeFactory($changePrompter));
     return $changeListFactory->createFromCommits($leadingCommits);
 }