mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Add tests for Pecl factory
This commit is contained in:
+2
-2
@@ -99,7 +99,7 @@ class Uuid implements UuidInterface, \JsonSerializable
|
||||
|
||||
/**
|
||||
*
|
||||
* @var UuidFactory
|
||||
* @var UuidFactoryInterface
|
||||
*/
|
||||
private static $factory = null;
|
||||
|
||||
@@ -725,7 +725,7 @@ class Uuid implements UuidInterface, \JsonSerializable
|
||||
return self::$factory;
|
||||
}
|
||||
|
||||
public static function setFactory(UuidFactory $factory)
|
||||
public static function setFactory(UuidFactoryInterface $factory)
|
||||
{
|
||||
self::$factory = $factory;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Rhumsaa\Uuid;
|
||||
|
||||
use Rhumsaa\Uuid\Provider\Time\SystemTimeProvider;
|
||||
use Rhumsaa\Uuid\Provider\Time\FixedTimeProvider;
|
||||
use Rhumsaa\Uuid\Generator\CombGenerator;
|
||||
|
||||
class PeclUuidTest extends UuidTest
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
Uuid::setFactory(new PeclUuidFactory(new UuidFactory()));
|
||||
|
||||
RandomGeneratorFactory::$forceNoOpensslRandomPseudoBytes = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user