. * */ namespace Test; abstract class TestCase extends \PHPUnit_Framework_TestCase { protected function getUniqueID($prefix = '', $length = 13) { // Do not use dots and slashes as we use the value for file names return $prefix . \OC::$server->getSecureRandom()->getLowStrengthGenerator()->generate( $length, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ); } public static function tearDownAfterClass() { if (\OC_Util::runningOnWindows()) { $rootDirectory = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data-autotest'); $mapper = new \OC\Files\Mapper($rootDirectory); $mapper->removePath($rootDirectory, true, true); } parent::tearDownAfterClass(); } }