mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-17 16:26:51 +03:00
Refactor from/toString methods to codecs
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Rhumsaa\Uuid\Codec;
|
||||
|
||||
use Rhumsaa\Uuid\TestCase;
|
||||
|
||||
class StringCodecTest extends TestCase
|
||||
{
|
||||
public function testDecodeParsesUuidStringCorrectly()
|
||||
{
|
||||
$codec = new StringCodec();
|
||||
|
||||
$uuid = $codec->decode('ff6f8cb0-c57d-11e1-9b21-0800200c9a66');
|
||||
|
||||
$this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid);
|
||||
$this->assertEquals('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user