Modify tests

This commit is contained in:
Ilya Plotnikov
2023-05-04 23:06:41 +06:00
parent 73eca65e69
commit 0f15cb8e41
2 changed files with 6 additions and 27 deletions
-27
View File
@@ -10,7 +10,6 @@ use Brick\Math\RoundingMode;
use DateTimeImmutable;
use DateTimeInterface;
use Mockery;
use Mockery\MockInterface;
use PHPUnit\Framework\MockObject\MockObject;
use Ramsey\Uuid\Builder\DefaultUuidBuilder;
use Ramsey\Uuid\Codec\StringCodec;
@@ -782,19 +781,6 @@ class UuidTest extends TestCase
$this->assertSame(7, $uuid->getVersion());
}
public function testUuid7ThrowsExceptionForUnsupportedFactory(): void
{
/** @var UuidFactoryInterface&MockInterface $factory */
$factory = Mockery::mock(UuidFactoryInterface::class);
Uuid::setFactory($factory);
$this->expectException(UnsupportedOperationException::class);
$this->expectExceptionMessage('The provided factory does not support the uuid7() method');
Uuid::uuid7();
}
public function testUuid7WithDateTime(): void
{
$dateTime = new DateTimeImmutable('@281474976710.655');
@@ -875,19 +861,6 @@ class UuidTest extends TestCase
$this->assertSame(8, $uuid->getVersion());
}
public function testUuid8ThrowsExceptionForUnsupportedFactory(): void
{
/** @var UuidFactoryInterface&MockInterface $factory */
$factory = Mockery::mock(UuidFactoryInterface::class);
Uuid::setFactory($factory);
$this->expectException(UnsupportedOperationException::class);
$this->expectExceptionMessage('The provided factory does not support the uuid8() method');
Uuid::uuid8("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff");
}
/**
* Tests known version-3 UUIDs
*