TQ\Tests\Helper::initEmptyGitRepository PHP Method

initEmptyGitRepository() public static method

public static initEmptyGitRepository ( string $path ) : string
$path string
return string
    public static function initEmptyGitRepository($path)
    {
        return exec(sprintf('cd %1$s && %2$s init && %2$s config user.email "[email protected]" && %2$s config user.name "test"', escapeshellarg($path), GIT_BINARY));
    }

Usage Example

コード例 #1
0
 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     Helper::removeDirectory(TESTS_TMP_PATH);
     Helper::createDirectory(TESTS_TMP_PATH);
     Helper::createDirectory(TESTS_REPO_PATH_1);
     Helper::createDirectory(TESTS_REPO_PATH_2);
     Helper::initEmptyGitRepository(TESTS_REPO_PATH_1);
     clearstatcache();
 }
All Usage Examples Of TQ\Tests\Helper::initEmptyGitRepository