public function testChangelog() { $generator = new CommitGenerator($this->client); $generator->generate($this->checkoutDir, array('First commit', 'Another commit', 'Awesome', 'Still going!', 'fixed issue #345')); $log = $this->client->log(''); $revisions = array_map(function ($commit) { return $commit->getRevision(); }, $log); $result = $this->client->changelog($revisions[3], $revisions[1]); $this->assertContainsOnlyInstancesOf('Webcreate\\Vcs\\Common\\Commit', $result); $this->assertCount(3, $result); $messages = array_map(function ($commit) { return $commit->getMessage(); }, $result); $expected = array('Still going!', 'Awesome', 'Another commit'); $this->assertEquals($expected, $messages); }
public function changelog(Version $version1, Version $version2) { return $this->client->changelog($version1->getBuild(), $version2->getBuild()); }