Skip to content

Commit

Permalink
Merge pull request #35 from agustingomes/ad-hoc/adopt-lazy-uuid-from-…
Browse files Browse the repository at this point in the history
…string-for-failing-tests

[Ad-hoc] Account for LazyUuidFromString on Uuid generation
  • Loading branch information
lcobucci committed Jul 30, 2020
2 parents 9dd8324 + e30e46e commit b1f2fd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"require": {
"php": "^7.4 || ^8.0",
"ramsey/uuid": "^4.0"
"ramsey/uuid": "^4.1"
},
"require-dev": {
"infection/infection": "^0.16",
Expand Down
8 changes: 4 additions & 4 deletions tests/IdentifierGenerator/RamseyUuidTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use Chimera\IdentifierGenerator\RamseyUuid;
use PHPUnit\Framework\TestCase;
use Ramsey\Uuid\Rfc4122\UuidV4;
use Ramsey\Uuid\Lazy\LazyUuidFromString;

final class RamseyUuidTest extends TestCase
{
Expand All @@ -19,7 +19,7 @@ public function generateShouldReturnAUuidVersion4(): void
$generator = new RamseyUuid();
$identifier = $generator->generate();

self::assertInstanceOf(UuidV4::class, $identifier);
self::assertInstanceOf(LazyUuidFromString::class, $identifier);
}

/**
Expand All @@ -34,8 +34,8 @@ public function generateShouldAlwaysReturnANewIdentifier(): void
$identifier1 = $generator->generate();
$identifier2 = $generator->generate();

self::assertInstanceOf(UuidV4::class, $identifier1);
self::assertInstanceOf(UuidV4::class, $identifier2);
self::assertInstanceOf(LazyUuidFromString::class, $identifier1);
self::assertInstanceOf(LazyUuidFromString::class, $identifier2);

self::assertNotEquals($identifier1, $identifier2);
self::assertNotSame((string) $identifier1, (string) $identifier2);
Expand Down

0 comments on commit b1f2fd1

Please sign in to comment.