public static function register($protocol, $binary = null)
{
$bufferFactory = Factory::getDefault();
if ($binary instanceof PathFactoryInterface) {
$pathFactory = $binary;
} else {
$binary = Binary::ensure($binary);
$pathFactory = new PathFactory($protocol, $binary, null);
}
parent::doRegister($protocol, $pathFactory, $bufferFactory);
}
/** * 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); mkdir(TESTS_TMP_PATH, 0777, true); mkdir(TESTS_REPO_PATH_1, 0777, true); exec(sprintf('cd %s && %s init', escapeshellarg(TESTS_REPO_PATH_1), GIT_BINARY)); clearstatcache(); StreamWrapper::register('git', new Binary(GIT_BINARY)); }