Files
DomFramework/Tests/UuidTest.php

32 lines
572 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 testUuid1()
{
$res = Uuid::uuid4();
$this->assertRegExp(36, strlen($res));
}
public function testUuid2()
{
$res = Uuid::uuid4();
$this->assertRegExp(true, strspn("0123456789abcdef-", $res) ==
strlen($res));
}
}