/** * @covers ::from */ public function testCanCallStatically() { // ---------------------------------------------------------------- // setup your test $repoDir = realpath(__DIR__ . '/../..'); // ---------------------------------------------------------------- // perform the change $result = GetLocalBranchesList::from($repoDir); // ---------------------------------------------------------------- // test the results $this->assertTrue(is_array($result)); $this->assertNotEmpty($result); $this->assertTrue(in_array('master', $result)); $this->assertTrue(in_array('develop', $result)); }
public static function from($repoDir) { $branches = array_merge(GetLocalBranchesList::from($repoDir), GetRemoteBranchesList::from($repoDir)); // all done return $branches; }