login()->loginNami(); Member::factory() ->defaults() ->has(Membership::factory()->in('Schnuppermitgliedschaft', 7, 'Wölfling', 8)->state(['from' => now()->subMonths(10)])) ->create(['firstname' => 'Max', 'lastname' => 'Muster']); Member::factory() ->defaults() ->has(Membership::factory()->ended()->in('Schnuppermitgliedschaft', 7, 'Wölfling', 8)->state(['from' => now()->subMonths(10)])) ->create(['firstname' => 'Jane', 'lastname' => 'Muster']); Livewire::test(TestersBlock::class) ->assertSee('Max Muster') ->assertSee(now()->subMonths(10)->addWeeks(8)->format('d.m.Y')) ->assertSee(now()->subMonths(10)->addWeeks(8)->diffForHumans()) ->assertDontSee('Jane'); } }