public function getVersions() { $versions = array(); $tags = $this->client->tags(); foreach ($tags as $tag) { $versions[] = $this->createVersion($tag->getName(), $tag->getRevision()); } $branches = $this->client->branches(); foreach ($branches as $branch) { $versions[] = $this->createVersion($branch->getName(), $branch->getRevision(), 'dev'); } return $versions; }
public function testBranches() { $branches = $this->client->branches(); $branchNames = array_map(function ($ref) { return $ref->getName(); }, $branches); $this->assertInternalType('array', $branches); $this->assertContains('feature1', $branchNames); $this->assertContainsOnlyInstancesOf('Webcreate\\Vcs\\Common\\Reference', $branches); }