diff --git a/tests/Feature/ComposeControllerTest.php b/tests/Feature/ComposeControllerTest.php index 88880219b..6d297878a 100644 --- a/tests/Feature/ComposeControllerTest.php +++ b/tests/Feature/ComposeControllerTest.php @@ -4,14 +4,14 @@ namespace Tests\Feature; use App\Models\User; use Database\Factories\ProfileFactory; -use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Foundation\Testing\LazilyRefreshDatabase; use Illuminate\Support\Facades\DB; use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class ComposeControllerTest extends TestCase { - use RefreshDatabase; + use LazilyRefreshDatabase; #[Test] public function search_location_can_filter_by_country() diff --git a/tests/Feature/CriticalRoutes/ApiRouteSmokeTest.php b/tests/Feature/CriticalRoutes/ApiRouteSmokeTest.php index 67bc98f9f..b281d53a9 100644 --- a/tests/Feature/CriticalRoutes/ApiRouteSmokeTest.php +++ b/tests/Feature/CriticalRoutes/ApiRouteSmokeTest.php @@ -1,10 +1,10 @@ get('/register') @@ -92,7 +92,7 @@ describe('routes that require database', function () { */ describe('guest profile page (regression: cached UserSetting model)', function () { - uses(RefreshDatabase::class); + uses(LazilyRefreshDatabase::class); it('renders a public profile for an unauthenticated user', function () { $user = User::factory()->create(); @@ -130,7 +130,7 @@ describe('guest profile page (regression: cached UserSetting model)', function ( }); describe('static site pages (regression: cached Page model)', function () { - uses(RefreshDatabase::class); + uses(LazilyRefreshDatabase::class); it('loads terms of use twice', function () { $this->get('/site/terms')->assertStatus(200); @@ -211,7 +211,7 @@ describe('static informational pages load for guests', function () { }); describe('community guidelines page (regression: cached page render)', function () { - uses(RefreshDatabase::class); + uses(LazilyRefreshDatabase::class); it('loads the fallback twice', function () { // No Page row exists; the route caches the rendered view either way. @@ -238,7 +238,7 @@ describe('community guidelines page (regression: cached page render)', function }); describe('public status page (regression: cached status/media services)', function () { - uses(RefreshDatabase::class); + uses(LazilyRefreshDatabase::class); it('renders a public post for a guest on repeated requests', function () { $user = User::factory()->create(); @@ -262,7 +262,7 @@ describe('public status page (regression: cached status/media services)', functi }); describe('profile activitypub object (regression: cached AP object)', function () { - uses(RefreshDatabase::class); + uses(LazilyRefreshDatabase::class); beforeEach(function () { // config_cache() falls back to config() when the DB-backed config diff --git a/tests/Feature/RemoteAuthServiceTest.php b/tests/Feature/RemoteAuthServiceTest.php index af67195d8..353e9cfc4 100644 --- a/tests/Feature/RemoteAuthServiceTest.php +++ b/tests/Feature/RemoteAuthServiceTest.php @@ -4,7 +4,7 @@ namespace Tests\Feature; use App\Models\RemoteAuthInstance; use App\Services\Account\RemoteAuthService; -use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Foundation\Testing\LazilyRefreshDatabase; use Illuminate\Http\Client\ConnectionException; use Illuminate\Support\Facades\Http; use PHPUnit\Framework\Attributes\Test; @@ -12,7 +12,7 @@ use Tests\TestCase; class RemoteAuthServiceTest extends TestCase { - use RefreshDatabase; + use LazilyRefreshDatabase; private function activeInstance(string $domain = 'mastodon.example'): RemoteAuthInstance { diff --git a/tests/Feature/RemoteOidcTest.php b/tests/Feature/RemoteOidcTest.php index 537e68bd2..b72d85fd0 100644 --- a/tests/Feature/RemoteOidcTest.php +++ b/tests/Feature/RemoteOidcTest.php @@ -5,7 +5,7 @@ namespace Tests\Feature; use App\Models\User; use App\Models\UserOidcMapping; use App\Services\UserOidcService; -use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Foundation\Testing\LazilyRefreshDatabase; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; use League\OAuth2\Client\Provider\GenericResourceOwner; @@ -17,8 +17,8 @@ use Tests\TestCase; class RemoteOidcTest extends TestCase { + use LazilyRefreshDatabase; use MockeryPHPUnitIntegration; - use RefreshDatabase; #[Test] public function view_oidc_start() diff --git a/tests/Feature/SeasonalAggregationTest.php b/tests/Feature/SeasonalAggregationTest.php index 9992fc33a..2707c473b 100644 --- a/tests/Feature/SeasonalAggregationTest.php +++ b/tests/Feature/SeasonalAggregationTest.php @@ -3,7 +3,7 @@ namespace Tests\Feature; use App\Models\Status; -use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Foundation\Testing\LazilyRefreshDatabase; use Illuminate\Support\Facades\DB; use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; @@ -23,7 +23,7 @@ use Tests\TestCase; class SeasonalAggregationTest extends TestCase { - use RefreshDatabase; + use LazilyRefreshDatabase; /** * Mirrors the aggregation used in SeasonalController::getData for diff --git a/tests/Feature/StatusDeleteCleanupTest.php b/tests/Feature/StatusDeleteCleanupTest.php index dc827ccd6..29468189b 100644 --- a/tests/Feature/StatusDeleteCleanupTest.php +++ b/tests/Feature/StatusDeleteCleanupTest.php @@ -8,7 +8,7 @@ use App\Models\MediaTag; use App\Models\Notification; use App\Models\Status; use App\Models\User; -use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Foundation\Testing\LazilyRefreshDatabase; use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; @@ -27,7 +27,7 @@ use Tests\TestCase; class StatusDeleteCleanupTest extends TestCase { - use RefreshDatabase; + use LazilyRefreshDatabase; #[Test] public function deleting_a_status_removes_associated_dms_and_their_notifications() diff --git a/tests/Unit/CuratedOnboardingNotifyAdminTest.php b/tests/Unit/CuratedOnboardingNotifyAdminTest.php index 100d01e75..2b9180707 100644 --- a/tests/Unit/CuratedOnboardingNotifyAdminTest.php +++ b/tests/Unit/CuratedOnboardingNotifyAdminTest.php @@ -6,7 +6,7 @@ use App\Jobs\CuratedOnboarding\CuratedOnboardingNotifyAdminNewApplicationPipelin use App\Mail\CuratedRegisterNotifyAdmin; use App\Models\CuratedRegister; use App\Models\User; -use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Foundation\Testing\LazilyRefreshDatabase; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Mail; use PHPUnit\Framework\Attributes\Test; @@ -14,7 +14,7 @@ use Tests\TestCase; class CuratedOnboardingNotifyAdminTest extends TestCase { - use RefreshDatabase; + use LazilyRefreshDatabase; protected function setUp(): void {