3 namespace Friendica\Test\src\Core;
5 use Friendica\Core\System;
6 use PHPUnit\Framework\TestCase;
8 class SystemTest extends TestCase
10 private function assertGuid($guid, $length)
13 $this->assertRegExp("/^[a-z0-9]{" . $length . "}?$/", $guid);
16 function testGuidWithoutParameter()
18 $guid = System::createGUID();
19 $this->assertGuid($guid, 16);
22 function testGuidWithSize32() {
23 $guid = System::createGUID(32);
24 $this->assertGuid($guid, 32);
27 function testGuidWithSize64() {
28 $guid = System::createGUID(64);
29 $this->assertGuid($guid, 64);