public function testGetGitHashShort() { touch('test'); exec('git init'); exec('git config user.name "Test User"'); exec('git config user.email test@test.test'); exec('git add test'); exec('git commit -m "Adding test file."'); $this->assertRegExp('/^[a-f0-9]{7}$/', $this->config->getGitHash(true)); // some process does not release the git files if ($this->isWindows()) { exec('rd /S /Q .git'); } }