Files
SkinbaseNova/tests/Feature/Worlds/WorldLaunchSeederTest.php
2026-04-18 17:02:56 +02:00

27 lines
810 B
PHP

<?php
declare(strict_types=1);
use App\Models\World;
use Database\Seeders\WorldLaunchSeeder;
it('seeds launch worlds with a featured current world and archived recurrence', function (): void {
$this->seed(WorldLaunchSeeder::class);
$featuredCurrent = World::query()
->where('slug', 'like', 'retro-month-%')
->where('is_featured', true)
->current()
->first();
expect($featuredCurrent)->not->toBeNull();
expect($featuredCurrent?->worldRelations()->count())->toBeGreaterThan(0);
$archivedEdition = World::query()
->where('parent_world_id', $featuredCurrent?->id)
->where('status', World::STATUS_ARCHIVED)
->first();
expect($archivedEdition)->not->toBeNull();
expect(World::query()->count())->toBeGreaterThanOrEqual(6);
});