From 9384fa65b5651ca032816579ec39b9e7e3610222 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 5 Nov 2014 13:20:43 +0100 Subject: [PATCH] Testcase base class --- tests/lib/testcase.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/lib/testcase.php diff --git a/tests/lib/testcase.php b/tests/lib/testcase.php new file mode 100644 index 00000000000..a4b4b0103f0 --- /dev/null +++ b/tests/lib/testcase.php @@ -0,0 +1,33 @@ +. + * + */ + +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' + ); + } +} -- 2.39.5