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)
12 $this->assertRegExp("/^[a-z0-9]{" . $length . "}?$/", $guid);
15 function testGuidWithoutParameter()
17 $guid = System::createGUID();
18 $this->assertGuid($guid, 16);
21 function testGuidWithSize() {
22 $guid = System::createGUID(20);
23 $this->assertGuid($guid, 20);