Ejemplo n.º 1
0
 /**
  * @covers ::check
  * @dataProvider provideFoldersToTest
  */
 public function testCanCallStatically($repoDir, $expectedResult)
 {
     // ----------------------------------------------------------------
     // setup your test
     // ----------------------------------------------------------------
     // perform the change
     $actualResult = IsGitRepo::check($repoDir);
     // ----------------------------------------------------------------
     // test the results
     $this->assertEquals($expectedResult, $actualResult);
 }
Ejemplo n.º 2
0
 /**
  * throws exceptions if we're not looking at a valid Git repo
  *
  * this is a wrapper around our IsGitRepo check
  *
  * @param  string $repoDir
  *         path to the git repo to examine
  * @return void
  */
 public static function check($repoDir)
 {
     if (!IsGitRepo::check($repoDir)) {
         throw new E4xx_NotGitRepo($repoDir);
     }
 }