name = 'Gamme Temporaire'; $range->picture_alt = 'Alt'; $range->picture_title = 'Title'; $range->status = true; $range->save(); $action = new DeleteRange(); $input = new DeleteRangeInput(range: $range); // WHEN $result = $action($input); // THEN expect($result)->toBeTrue(); $this->assertDatabaseMissing('ranges', [ 'id' => $range->id, ]); }); test('it throws when an invalid input is passed', function () { // GIVEN $action = new DeleteRange(); $invalidInput = new class () implements ActionInput { }; // WHEN & THEN expect(fn () => $action($invalidInput)) ->toThrow(\InvalidArgumentException::class); }); });