12
12
namespace Symfony \Component \Uid \Tests ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Component \Uid \Exception \InvalidArgumentException ;
15
16
use Symfony \Component \Uid \MaxUuid ;
16
17
use Symfony \Component \Uid \NilUuid ;
17
18
use Symfony \Component \Uid \Tests \Fixtures \CustomUuid ;
@@ -35,7 +36,7 @@ class UuidTest extends TestCase
35
36
*/
36
37
public function testConstructorWithInvalidUuid (string $ uuid )
37
38
{
38
- $ this ->expectException (\ InvalidArgumentException::class);
39
+ $ this ->expectException (InvalidArgumentException::class);
39
40
$ this ->expectExceptionMessage ('Invalid UUID: " ' .$ uuid .'". ' );
40
41
41
42
Uuid::fromString ($ uuid );
@@ -58,7 +59,7 @@ public function testInvalidVariant(string $uuid)
58
59
$ uuid = (string ) $ uuid ;
59
60
$ class = Uuid::class.'V ' .$ uuid [14 ];
60
61
61
- $ this ->expectException (\ InvalidArgumentException::class);
62
+ $ this ->expectException (InvalidArgumentException::class);
62
63
$ this ->expectExceptionMessage ('Invalid UUIDv ' .$ uuid [14 ].': " ' .$ uuid .'". ' );
63
64
64
65
new $ class ($ uuid );
@@ -381,7 +382,7 @@ public function testFromBinary()
381
382
*/
382
383
public function testFromBinaryInvalidFormat (string $ ulid )
383
384
{
384
- $ this ->expectException (\ InvalidArgumentException::class);
385
+ $ this ->expectException (InvalidArgumentException::class);
385
386
386
387
Uuid::fromBinary ($ ulid );
387
388
}
@@ -408,7 +409,7 @@ public function testFromBase58()
408
409
*/
409
410
public function testFromBase58InvalidFormat (string $ ulid )
410
411
{
411
- $ this ->expectException (\ InvalidArgumentException::class);
412
+ $ this ->expectException (InvalidArgumentException::class);
412
413
413
414
Uuid::fromBase58 ($ ulid );
414
415
}
@@ -435,7 +436,7 @@ public function testFromBase32()
435
436
*/
436
437
public function testFromBase32InvalidFormat (string $ ulid )
437
438
{
438
- $ this ->expectException (\ InvalidArgumentException::class);
439
+ $ this ->expectException (InvalidArgumentException::class);
439
440
440
441
Uuid::fromBase32 ($ ulid );
441
442
}
@@ -462,7 +463,7 @@ public function testFromRfc4122()
462
463
*/
463
464
public function testFromRfc4122InvalidFormat (string $ ulid )
464
465
{
465
- $ this ->expectException (\ InvalidArgumentException::class);
466
+ $ this ->expectException (InvalidArgumentException::class);
466
467
467
468
Uuid::fromRfc4122 ($ ulid );
468
469
}
@@ -509,7 +510,7 @@ public function testV1ToV6()
509
510
510
511
public function testV1ToV7BeforeUnixEpochThrows ()
511
512
{
512
- $ this ->expectException (\ InvalidArgumentException::class);
513
+ $ this ->expectException (InvalidArgumentException::class);
513
514
$ this ->expectExceptionMessage ('Cannot convert UUID to v7: its timestamp is before the Unix epoch. ' );
514
515
515
516
(new UuidV1 ('9aba8000-ff00-11b0-b3db-3b3fc83afdfc ' ))->toV7 (); // Timestamp is 1969-01-01 00:00:00.0000000
0 commit comments