I use this to get a deterministic value in my test but I get an exception: Str::createUuidsUsing(fn () => 'some-uuid');
Error: Call to a member function toString() on string in /Users/fredrik/Documents/code/getapet-backend/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/NotificationFake.php:317
This is caused by using ->toString(). What we could instead do is to use $notification->id = (string) Str::uuid();.
|
$notification->id = Str::uuid()->toString(); |