mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-15 16:07:55 +03:00
Move RandomGeneratorInterface and RandomGeneratorFactory to Generator NS
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Ramsey\Uuid\Generator;
|
||||
|
||||
use Ramsey\Uuid\TestCase;
|
||||
|
||||
class RandomGeneratorFactoryTest extends TestCase
|
||||
{
|
||||
public function testFactoryReturnsNonOpenSslGeneratorWithForceNoOpenSsl()
|
||||
{
|
||||
RandomGeneratorFactory::$forceNoOpensslRandomPseudoBytes = true;
|
||||
|
||||
$generator = RandomGeneratorFactory::getGenerator();
|
||||
|
||||
$this->assertNotInstanceOf('\Ramsey\Uuid\Generator\OpenSslGenerator', $generator);
|
||||
}
|
||||
|
||||
public function testFactoryReturnsOpenSslGeneratorIfAvailable()
|
||||
{
|
||||
RandomGeneratorFactory::$forceNoOpensslRandomPseudoBytes = false;
|
||||
|
||||
$generator = RandomGeneratorFactory::getGenerator();
|
||||
|
||||
$this->assertInstanceOf('\Ramsey\Uuid\Generator\OpenSslGenerator', $generator);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user