[UID] Rename NullUuid to NilUuid
This commit is contained in:
parent
68dec1a068
commit
cbb6d233a1
@ -16,7 +16,7 @@ namespace Symfony\Component\Uid;
|
||||
*
|
||||
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
||||
*/
|
||||
class NullUuid extends Uuid
|
||||
class NilUuid extends Uuid
|
||||
{
|
||||
protected const TYPE = UUID_TYPE_NULL;
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace Symfony\Tests\Component\Uid;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Uid\NullUuid;
|
||||
use Symfony\Component\Uid\NilUuid;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
use Symfony\Component\Uid\UuidV1;
|
||||
use Symfony\Component\Uid\UuidV3;
|
||||
@ -146,11 +146,11 @@ class UuidTest extends TestCase
|
||||
$this->assertSame([$a, $b, $c, $d], $uuids);
|
||||
}
|
||||
|
||||
public function testNullUuid()
|
||||
public function testNilUuid()
|
||||
{
|
||||
$uuid = Uuid::fromString('00000000-0000-0000-0000-000000000000');
|
||||
|
||||
$this->assertInstanceOf(NullUuid::class, $uuid);
|
||||
$this->assertInstanceOf(NilUuid::class, $uuid);
|
||||
$this->assertSame('00000000-0000-0000-0000-000000000000', (string) $uuid);
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ class Uuid implements \JsonSerializable
|
||||
case UuidV4::TYPE: return new UuidV4($uuid);
|
||||
case UuidV5::TYPE: return new UuidV5($uuid);
|
||||
case UuidV6::TYPE: return new UuidV6($uuid);
|
||||
case NullUuid::TYPE: return new NullUuid();
|
||||
case NilUuid::TYPE: return new NilUuid();
|
||||
case self::TYPE: return new self($uuid);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user