mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Add test covering Uuid::fromString() being called with empty string
This commit is contained in:
@@ -124,6 +124,14 @@ class UuidTest extends TestCase
|
||||
$this->assertSame('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString());
|
||||
}
|
||||
|
||||
public function testFromStringWithEmptyString(): void
|
||||
{
|
||||
$this->expectException(InvalidUuidStringException::class);
|
||||
$this->expectExceptionMessage('Invalid UUID string: ');
|
||||
|
||||
Uuid::fromString('');
|
||||
}
|
||||
|
||||
public function testGetBytes(): void
|
||||
{
|
||||
$uuid = Uuid::fromString('ff6f8cb0-c57d-11e1-9b21-0800200c9a66');
|
||||
|
||||
Reference in New Issue
Block a user