entryService = App::make(EntryService::class); }); it('checks if an entry is late', function() { $openAudition = Audition::factory()->create(['entry_deadline' => Carbon::tomorrow()]); $closedAudition = Audition::factory()->create(['entry_deadline' => Carbon::yesterday()]); $onTime = Entry::factory()->create(['audition_id' => $openAudition->id]); $late = Entry::factory()->create(['audition_id' => $closedAudition]); expect($this->entryService->isEntryLate($onTime))->toBeFalse(); expect($this->entryService->isEntryLate($late))->toBeTrue(); });