Files
php-uuid/tests/UuidFactoryTest.php
T
Thibaud Fabre 84123b2060 Remove all env related logic from factory
Defers all environment related decisions to factory initialization
All behavior is customizable through DI, but all deps are initialized to proper default instances
Removes static factory configuration
2014-11-08 12:41:40 +01:00

25 lines
624 B
PHP

<?php
namespace Rhumsaa\Uuid;
class UuidFactoryTest extends TestCase
{
public function testParsesUuidCorrectly()
{
$factory = new UuidFactory();
$uuid = $factory->fromString('ff6f8cb0-c57d-11e1-9b21-0800200c9a66');
$this->assertEquals('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString());
}
public function testParsesGuidCorrectly()
{
$factory = new UuidFactory(new FeatureSet(true));
$uuid = $factory->fromString('ff6f8cb0-c57d-11e1-9b21-0800200c9a66');
$this->assertEquals('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString());
}
}