Files
DomFramework/Tests/UuidTest.php
2022-11-25 21:21:30 +01:00

29 lines
571 B
PHP

<?php
/** DomFramework - Tests
* @package domframework
* @author Dominique Fournier <dominique@fournier38.fr>
* @license BSD
*/
namespace Domframework\Tests;
use Domframework\Uuid;
/** Test the Uuid.php file */
class UuidTest extends \PHPUnit_Framework_TestCase
{
public function test_uuid1()
{
$res = Uuid::uuid4();
$this->assertRegExp(36, strlen($res));
}
public function test_uuid2()
{
$res = Uuid::uuid4();
$this->assertRegExp(true, strspn("0123456789abcdef-", $res) ==
strlen($res));
}
}