mirror of
https://github.com/PGYER/codefever.git
synced 2026-05-13 17:36:07 +08:00
15 lines
340 B
PHP
Executable File
15 lines
340 B
PHP
Executable File
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use service\Utility\UUID;
|
|
|
|
class GetUUIDTest extends TestCase {
|
|
public function testGetUUID()
|
|
{
|
|
$excepted = '/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i';
|
|
$actual = UUID::getUUID();
|
|
|
|
$this->assertEquals(1, preg_match($excepted, $actual));
|
|
}
|
|
}
|