diff --git a/tests/Feature/Storage/ExpoPendingNotificationStorageTest.php b/tests/Feature/Storage/ExpoPendingNotificationStorageTest.php index e864d89..bb788d0 100644 --- a/tests/Feature/Storage/ExpoPendingNotificationStorageTest.php +++ b/tests/Feature/Storage/ExpoPendingNotificationStorageTest.php @@ -12,7 +12,7 @@ for ($i = 0; $i < 120; $i++) { ExpoNotification::create([ 'data' => json_encode([ - 'foo' => fake()->slug, + 'foo' => $this->fake()->slug, ], JSON_THROW_ON_ERROR), ]); } diff --git a/tests/TestCase.php b/tests/TestCase.php index 97846e0..14ff86f 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -4,6 +4,8 @@ namespace YieldStudio\LaravelExpoNotifier\Tests; +use Faker\Factory; +use Faker\Generator; use Orchestra\Testbench\TestCase as Orchestra; use YieldStudio\LaravelExpoNotifier\Contracts\ExpoNotificationsServiceInterface; use YieldStudio\LaravelExpoNotifier\Contracts\ExpoPendingNotificationStorageInterface; @@ -61,4 +63,9 @@ protected function getEnvironmentSetUp($app): void 'notification' => ExpoPendingNotificationStorageMysql::class, ]); } + + protected function fake(): Generator + { + return Factory::create(); + } }