From: Joas Schilling Date: Wed, 5 Nov 2014 12:20:43 +0000 (+0100) Subject: Testcase base class X-Git-Tag: v7.0.4RC1~22^2~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9384fa65b5651ca032816579ec39b9e7e3610222;p=nextcloud-server.git Testcase base class --- 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' + ); + } +}