public function testCountWithBranches() { $branches = new Branches(); $branches->add(new Branch('foo')); $branches->add(new Branch('bar')); $this->assertSame(2, count($branches)); }
public function getBranches() : Branches { $result = $this->client->run($this->directory, new PlainArgument('branch')); $branches = new Branches($this->client); foreach ($result->getOutput() as $branch) { $branches->add(new Branch($branch)); } return $branches; }