fill([ 'question' => 'Question à supprimer ?', 'answer' => 'Réponse à supprimer.', ]); $faq->saveOrFail(); $action = new DeleteFaq(); $input = new DeleteFaqInput(faq: $faq); // WHEN $action($input); // THEN expect(Faq::query()->find($faq->id))->toBeNull(); }); it('throws when an invalid input is passed', function (): void { // GIVEN $action = new DeleteFaq(); $invalidInput = new class () implements ActionInput { }; // WHEN expect( /** @phpstan-ignore argument.type */ fn () => $action($invalidInput) ) // THEN ->toThrow(\InvalidArgumentException::class); }); });