示例#1
0
 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;
 }
示例#2
0
 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);
 }