/**
* 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::initEmptyGitRepository(TESTS_REPO_PATH_1);
for ($i = 0; $i < 5; $i++) {
$file = sprintf('file_%d.txt', $i);
$path = TESTS_REPO_PATH_1 . '/' . $file;
file_put_contents($path, sprintf('File %d', $i));
Helper::executeGit(TESTS_REPO_PATH_1, sprintf('add %s', escapeshellarg($file)));
}
Helper::executeGit(TESTS_REPO_PATH_1, sprintf('commit --message=%s', escapeshellarg('Initial commit')));
clearstatcache();
}