OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
firebase
/
vendor
/
ramsey
/
uuid
/
tests
/
Nonstandard
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/12/2024 10:36:11 AM
rwxr-xr-x
📄
FieldsTest.php
2.89 KB
08/12/2024 10:34:39 AM
rw-r--r--
📄
UuidBuilderTest.php
943 bytes
08/12/2024 10:34:39 AM
rw-r--r--
📄
UuidV6Test.php
6 KB
08/12/2024 10:34:39 AM
rw-r--r--
Editing: UuidBuilderTest.php
Close
<?php declare(strict_types=1); namespace Ramsey\Uuid\Test\Nonstandard; use Mockery; use Ramsey\Uuid\Codec\CodecInterface; use Ramsey\Uuid\Exception\UnableToBuildUuidException; use Ramsey\Uuid\Nonstandard\UuidBuilder; use Ramsey\Uuid\Test\TestCase; use RuntimeException; class UuidBuilderTest extends TestCase { public function testBuildThrowsException(): void { $codec = Mockery::mock(CodecInterface::class); $builder = Mockery::mock(UuidBuilder::class); $builder->shouldAllowMockingProtectedMethods(); $builder->shouldReceive('buildFields')->andThrow( RuntimeException::class, 'exception thrown' ); $builder->shouldReceive('build')->passthru(); $this->expectException(UnableToBuildUuidException::class); $this->expectExceptionMessage('exception thrown'); $builder->build($codec, 'foobar'); } }