diff --git a/tests/Feature/AdminTest.php b/tests/Feature/AdminTest.php index bac4da402..116b1b08e 100644 --- a/tests/Feature/AdminTest.php +++ b/tests/Feature/AdminTest.php @@ -5,11 +5,11 @@ use App\Models\Thread; use App\Models\User; use Carbon\Carbon; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('requires login', function () { $this->get('/admin') diff --git a/tests/Feature/ArticleTest.php b/tests/Feature/ArticleTest.php index a3dd06428..439e7b6a4 100644 --- a/tests/Feature/ArticleTest.php +++ b/tests/Feature/ArticleTest.php @@ -7,7 +7,7 @@ use App\Models\User; use App\Notifications\ArticleApprovedNotification; use App\Notifications\ArticleSubmitted; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Bus; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Notification; @@ -15,7 +15,7 @@ use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('users cannot create an article when not logged in', function () { $this->get('/articles/create') diff --git a/tests/Feature/AuthTest.php b/tests/Feature/AuthTest.php index 8893db7c8..bf0a42266 100644 --- a/tests/Feature/AuthTest.php +++ b/tests/Feature/AuthTest.php @@ -4,7 +4,7 @@ use Carbon\Carbon; use Illuminate\Auth\Notifications\VerifyEmail; use Illuminate\Contracts\Auth\PasswordBroker; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Notification; @@ -12,7 +12,7 @@ use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('users can register', function () { Notification::fake(); diff --git a/tests/Feature/CanonicalUrlTest.php b/tests/Feature/CanonicalUrlTest.php index ce0d2434a..d7d8c6421 100644 --- a/tests/Feature/CanonicalUrlTest.php +++ b/tests/Feature/CanonicalUrlTest.php @@ -3,13 +3,13 @@ use App\Models\Article; use App\Models\Tag; use App\Models\Thread; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\App; use Illuminate\Support\HtmlString; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); function inProduction() { diff --git a/tests/Feature/EditorTest.php b/tests/Feature/EditorTest.php index 8edbe08c9..5b6c16eab 100644 --- a/tests/Feature/EditorTest.php +++ b/tests/Feature/EditorTest.php @@ -3,12 +3,12 @@ use App\Livewire\Editor; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Sequence; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Livewire\Livewire; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('participants are rendered when mentions are invoked', function () { $participants = User::factory()->count(3)->create(); diff --git a/tests/Feature/ForumTest.php b/tests/Feature/ForumTest.php index cd25f72a0..5e9c20aee 100644 --- a/tests/Feature/ForumTest.php +++ b/tests/Feature/ForumTest.php @@ -9,7 +9,7 @@ use App\Models\User; use App\Notifications\MentionNotification; use App\Notifications\ThreadDeletedNotification; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Notifications\DatabaseNotification; use Illuminate\Support\Facades\Notification; use Illuminate\Support\HtmlString; @@ -17,7 +17,7 @@ use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('users can see a list of latest threads', function () { Thread::factory()->create(['subject' => 'The first thread']); diff --git a/tests/Feature/HomeTest.php b/tests/Feature/HomeTest.php index b60056090..ddf0aedbd 100644 --- a/tests/Feature/HomeTest.php +++ b/tests/Feature/HomeTest.php @@ -1,10 +1,10 @@ get('/') diff --git a/tests/Feature/ModeratorTest.php b/tests/Feature/ModeratorTest.php index 14067386a..e175f5e0d 100644 --- a/tests/Feature/ModeratorTest.php +++ b/tests/Feature/ModeratorTest.php @@ -1,11 +1,11 @@ create(); diff --git a/tests/Feature/NavigationTest.php b/tests/Feature/NavigationTest.php index d52e094a7..1b1d2dee1 100644 --- a/tests/Feature/NavigationTest.php +++ b/tests/Feature/NavigationTest.php @@ -4,13 +4,13 @@ use App\Models\Reply; use App\Models\Thread; use App\Notifications\NewReplyNotification; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Str; use Livewire\Livewire; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('a user sees the correct number of notifications', function () { $userOne = $this->createUser(); diff --git a/tests/Feature/NotificationsTest.php b/tests/Feature/NotificationsTest.php index a8bbdde9f..917830ee6 100644 --- a/tests/Feature/NotificationsTest.php +++ b/tests/Feature/NotificationsTest.php @@ -4,7 +4,7 @@ use App\Models\Reply; use App\Models\Thread; use App\Notifications\NewReplyNotification; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\HtmlString; use Illuminate\Support\Str; use Livewire\Livewire; @@ -13,7 +13,7 @@ use function Pest\Laravel\post; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('users_can_see_notifications', function () { $userOne = $this->createUser(); diff --git a/tests/Feature/ProfileTest.php b/tests/Feature/ProfileTest.php index 76c02c49a..1474ae723 100644 --- a/tests/Feature/ProfileTest.php +++ b/tests/Feature/ProfileTest.php @@ -1,10 +1,10 @@ createUser(); diff --git a/tests/Feature/SettingsTest.php b/tests/Feature/SettingsTest.php index 9934d1762..72130c384 100644 --- a/tests/Feature/SettingsTest.php +++ b/tests/Feature/SettingsTest.php @@ -2,14 +2,14 @@ use App\Models\User; use Database\Factories\UserFactory; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Http; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('requires login', function () { $this->get('/settings') diff --git a/tests/Feature/SubscriptionsTest.php b/tests/Feature/SubscriptionsTest.php index 86698c0db..5708fb56f 100644 --- a/tests/Feature/SubscriptionsTest.php +++ b/tests/Feature/SubscriptionsTest.php @@ -6,7 +6,7 @@ use App\Models\Thread; use App\Models\User; use App\Notifications\NewReplyNotification; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Facades\Notification; use Illuminate\Support\HtmlString; @@ -14,7 +14,7 @@ use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); uses(WithFaker::class); test('users receive notifications for new replies to threads where they are subscribed to', function () { diff --git a/tests/Integration/Api/ArticleTest.php b/tests/Integration/Api/ArticleTest.php index 64cdaf41f..5ff02ec19 100644 --- a/tests/Integration/Api/ArticleTest.php +++ b/tests/Integration/Api/ArticleTest.php @@ -4,12 +4,12 @@ use App\Models\Article; use Database\Factories\ArticleFactory; use Database\Factories\TagFactory; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Laravel\Sanctum\Sanctum; use Tests\CreatesUsers; use Tests\TestCase; -uses(TestCase::class, CreatesUsers::class, DatabaseMigrations::class); +uses(TestCase::class, CreatesUsers::class, RefreshDatabase::class); it('can store an article over the API', function (array $body, array $response) { Event::fake(); diff --git a/tests/Integration/Commands/PostArticleToSocialMediaTest.php b/tests/Integration/Commands/PostArticleToSocialMediaTest.php index f519702cd..bb793a4b9 100644 --- a/tests/Integration/Commands/PostArticleToSocialMediaTest.php +++ b/tests/Integration/Commands/PostArticleToSocialMediaTest.php @@ -4,14 +4,14 @@ use App\Models\Article; use App\Notifications\PostArticleToBluesky; use App\Notifications\PostArticleToTwitter; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Notifications\AnonymousNotifiable; use Illuminate\Support\Facades\Notification; use Illuminate\Support\Str; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); beforeEach(function () { Notification::fake(); diff --git a/tests/Integration/Commands/UpdateArticleViewCountsTest.php b/tests/Integration/Commands/UpdateArticleViewCountsTest.php index fb5c473ea..ea0c6f010 100644 --- a/tests/Integration/Commands/UpdateArticleViewCountsTest.php +++ b/tests/Integration/Commands/UpdateArticleViewCountsTest.php @@ -2,12 +2,12 @@ use App\Console\Commands\UpdateArticleViewCounts; use App\Models\Article; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Http; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('article view counts can be updated', function () { Http::fake(function () { diff --git a/tests/Integration/Jobs/BanUserTest.php b/tests/Integration/Jobs/BanUserTest.php index 985977d6c..bf14f9814 100644 --- a/tests/Integration/Jobs/BanUserTest.php +++ b/tests/Integration/Jobs/BanUserTest.php @@ -1,11 +1,11 @@ createUser(['banned_at' => null]); diff --git a/tests/Integration/Jobs/BlockUserTest.php b/tests/Integration/Jobs/BlockUserTest.php index 398848914..10b2a4dd2 100644 --- a/tests/Integration/Jobs/BlockUserTest.php +++ b/tests/Integration/Jobs/BlockUserTest.php @@ -1,11 +1,11 @@ createUser(); diff --git a/tests/Integration/Jobs/CreateApiTokenTest.php b/tests/Integration/Jobs/CreateApiTokenTest.php index b1a965157..534fb7cb1 100644 --- a/tests/Integration/Jobs/CreateApiTokenTest.php +++ b/tests/Integration/Jobs/CreateApiTokenTest.php @@ -1,11 +1,11 @@ createUser(); diff --git a/tests/Integration/Jobs/CreateArticleTest.php b/tests/Integration/Jobs/CreateArticleTest.php index 8ff6ee29b..8796c6625 100644 --- a/tests/Integration/Jobs/CreateArticleTest.php +++ b/tests/Integration/Jobs/CreateArticleTest.php @@ -3,12 +3,12 @@ use App\Events\ArticleWasSubmittedForApproval; use App\Jobs\CreateArticle; use App\Models\Article; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Str; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('we can create a draft article', function () { $user = $this->createUser(); diff --git a/tests/Integration/Jobs/CreateReplyTest.php b/tests/Integration/Jobs/CreateReplyTest.php index 5e7356937..4a77e4a89 100644 --- a/tests/Integration/Jobs/CreateReplyTest.php +++ b/tests/Integration/Jobs/CreateReplyTest.php @@ -4,13 +4,13 @@ use App\Jobs\CreateReply; use App\Models\Reply; use App\Models\Thread; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Event; use Illuminate\Support\Str; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('we can create a reply', function () { Event::fake(); diff --git a/tests/Integration/Jobs/CreateThreadTest.php b/tests/Integration/Jobs/CreateThreadTest.php index f1ab6cf20..7649ac13f 100644 --- a/tests/Integration/Jobs/CreateThreadTest.php +++ b/tests/Integration/Jobs/CreateThreadTest.php @@ -2,12 +2,12 @@ use App\Jobs\CreateThread; use App\Models\Thread; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Str; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('we can create a thread', function () { $user = $this->createUser(); diff --git a/tests/Integration/Jobs/DeleteApiTokenTest.php b/tests/Integration/Jobs/DeleteApiTokenTest.php index c35965cc6..1a911ddfc 100644 --- a/tests/Integration/Jobs/DeleteApiTokenTest.php +++ b/tests/Integration/Jobs/DeleteApiTokenTest.php @@ -2,11 +2,11 @@ use App\Jobs\DeleteApiToken; use Database\Factories\UserFactory; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); it('deletes the specified API token for the given user', function () { $user = $this->createUser(); diff --git a/tests/Integration/Jobs/DeleteArticleTest.php b/tests/Integration/Jobs/DeleteArticleTest.php index debe0203d..f8c2f436f 100644 --- a/tests/Integration/Jobs/DeleteArticleTest.php +++ b/tests/Integration/Jobs/DeleteArticleTest.php @@ -2,11 +2,11 @@ use App\Jobs\DeleteArticle; use App\Models\Article; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('an article can be deleted', function () { $article = Article::factory()->create(); diff --git a/tests/Integration/Jobs/DeleteRepliesTest.php b/tests/Integration/Jobs/DeleteRepliesTest.php index e88137177..6f771198f 100644 --- a/tests/Integration/Jobs/DeleteRepliesTest.php +++ b/tests/Integration/Jobs/DeleteRepliesTest.php @@ -3,11 +3,11 @@ use App\Jobs\DeleteReply; use App\Models\Reply; use App\Models\Thread; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('reply authors can force delete their replies', function () { $user = $this->createUser(); diff --git a/tests/Integration/Jobs/DeleteThreadTest.php b/tests/Integration/Jobs/DeleteThreadTest.php index b3e9db2c9..c95410f27 100644 --- a/tests/Integration/Jobs/DeleteThreadTest.php +++ b/tests/Integration/Jobs/DeleteThreadTest.php @@ -4,11 +4,11 @@ use App\Models\Like; use App\Models\Reply; use App\Models\Thread; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('we can delete a thread and its replies', function () { $thread = Thread::factory()->create(); diff --git a/tests/Integration/Jobs/DeleteUserTest.php b/tests/Integration/Jobs/DeleteUserTest.php index 8dd2dfb1b..c830d3d8e 100644 --- a/tests/Integration/Jobs/DeleteUserTest.php +++ b/tests/Integration/Jobs/DeleteUserTest.php @@ -4,11 +4,11 @@ use App\Models\Reply; use App\Models\Thread; use App\Models\User; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('we can delete a user with replies', function () { $user = User::factory()->create(); diff --git a/tests/Integration/Jobs/DeleteUserThreadsTest.php b/tests/Integration/Jobs/DeleteUserThreadsTest.php index bc6907773..e0c2c07ef 100644 --- a/tests/Integration/Jobs/DeleteUserThreadsTest.php +++ b/tests/Integration/Jobs/DeleteUserThreadsTest.php @@ -3,11 +3,11 @@ use App\Jobs\DeleteUserThreads; use App\Models\Thread; use App\Models\User; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('we can delete an user threads', function () { $user = User::factory()->create(); diff --git a/tests/Integration/Jobs/GenerateSocialShareImageTest.php b/tests/Integration/Jobs/GenerateSocialShareImageTest.php index 57deaa5f9..029bb5140 100644 --- a/tests/Integration/Jobs/GenerateSocialShareImageTest.php +++ b/tests/Integration/Jobs/GenerateSocialShareImageTest.php @@ -2,12 +2,12 @@ use App\Jobs\GenerateSocialShareImage; use App\Models\Article; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Spatie\Pixelmatch\Pixelmatch; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('social image is generated for articles', function () { $article = Article::factory()->create([ diff --git a/tests/Integration/Jobs/RegisterUserTest.php b/tests/Integration/Jobs/RegisterUserTest.php index 2b05b7cf6..1c2daaffe 100644 --- a/tests/Integration/Jobs/RegisterUserTest.php +++ b/tests/Integration/Jobs/RegisterUserTest.php @@ -3,11 +3,11 @@ use App\Exceptions\CannotCreateUser; use App\Jobs\RegisterUser; use App\Models\User; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('we can create a user', function () { $this->dispatch( diff --git a/tests/Integration/Jobs/SyncArticleImageTest.php b/tests/Integration/Jobs/SyncArticleImageTest.php index ba0e92c9b..7096d104e 100644 --- a/tests/Integration/Jobs/SyncArticleImageTest.php +++ b/tests/Integration/Jobs/SyncArticleImageTest.php @@ -2,13 +2,13 @@ use App\Jobs\SyncArticleImage; use App\Models\Article; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Http; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('hero image url and author information is updated for published articles with hero image', function () { Config::set('services.unsplash.access_key', 'test'); diff --git a/tests/Integration/Jobs/UnbanUserTest.php b/tests/Integration/Jobs/UnbanUserTest.php index 76fcfe8f9..a641bae7e 100644 --- a/tests/Integration/Jobs/UnbanUserTest.php +++ b/tests/Integration/Jobs/UnbanUserTest.php @@ -2,11 +2,11 @@ use App\Jobs\UnbanUser; use Carbon\Carbon; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); it('can unban a user', function () { $user = $this->createUser(['banned_at' => Carbon::yesterday()]); diff --git a/tests/Integration/Jobs/UnblockUserTest.php b/tests/Integration/Jobs/UnblockUserTest.php index 1594d7592..3506458ab 100644 --- a/tests/Integration/Jobs/UnblockUserTest.php +++ b/tests/Integration/Jobs/UnblockUserTest.php @@ -1,11 +1,11 @@ createUser(); diff --git a/tests/Integration/Jobs/UpdateArticleTest.php b/tests/Integration/Jobs/UpdateArticleTest.php index 3795516d9..66dbb75d8 100644 --- a/tests/Integration/Jobs/UpdateArticleTest.php +++ b/tests/Integration/Jobs/UpdateArticleTest.php @@ -3,11 +3,11 @@ use App\Events\ArticleWasSubmittedForApproval; use App\Jobs\UpdateArticle; use App\Models\Article; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('we can update an article', function () { $user = $this->createUser(); diff --git a/tests/Integration/Jobs/UpdateProfileTest.php b/tests/Integration/Jobs/UpdateProfileTest.php index c62ee7871..2eead3f97 100644 --- a/tests/Integration/Jobs/UpdateProfileTest.php +++ b/tests/Integration/Jobs/UpdateProfileTest.php @@ -2,12 +2,12 @@ use App\Events\EmailAddressWasChanged; use App\Jobs\UpdateProfile; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Event; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('we can update a user profile', function () { $user = $this->createUser(); diff --git a/tests/Integration/Mail/NewReplyEmailTest.php b/tests/Integration/Mail/NewReplyEmailTest.php index a63c39a24..eb23d5fce 100644 --- a/tests/Integration/Mail/NewReplyEmailTest.php +++ b/tests/Integration/Mail/NewReplyEmailTest.php @@ -4,11 +4,11 @@ use App\Models\Reply; use App\Models\Subscription; use App\Models\User; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); it('contains a note about solutions when the receiver is the thread author', function () { $reply = Reply::factory()->create(); diff --git a/tests/Integration/Models/SubscriptionTest.php b/tests/Integration/Models/SubscriptionTest.php index c7577d681..733b34912 100644 --- a/tests/Integration/Models/SubscriptionTest.php +++ b/tests/Integration/Models/SubscriptionTest.php @@ -1,11 +1,11 @@ create()->uuid(); diff --git a/tests/Integration/Models/ThreadTest.php b/tests/Integration/Models/ThreadTest.php index abd479325..ee7dac109 100644 --- a/tests/Integration/Models/ThreadTest.php +++ b/tests/Integration/Models/ThreadTest.php @@ -5,12 +5,12 @@ use App\Models\Thread; use App\Models\User; use Carbon\Carbon; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Str; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); it('can find by slug', function () { Thread::factory()->create(['slug' => 'foo']); diff --git a/tests/Integration/Models/UserTest.php b/tests/Integration/Models/UserTest.php index aee6a20c7..eba990694 100644 --- a/tests/Integration/Models/UserTest.php +++ b/tests/Integration/Models/UserTest.php @@ -5,11 +5,11 @@ use App\Models\Reply; use App\Models\Thread; use App\Models\User; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); it('can find by username', function () { $this->createUser(['username' => 'johndoe']); diff --git a/tests/Integration/Queries/SearchUsersTest.php b/tests/Integration/Queries/SearchUsersTest.php index 5a98051f2..c79296498 100644 --- a/tests/Integration/Queries/SearchUsersTest.php +++ b/tests/Integration/Queries/SearchUsersTest.php @@ -2,11 +2,11 @@ use App\Models\User; use App\Queries\SearchUsers; -use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); it('can search by name or email or username', function () { User::factory()->create(['name' => 'Freek Murze', 'email' => 'freek@freek.com']);