Loading...
Loading...
Writes Pest feature tests for Laravel HTTP controllers using repeatable controller-test patterns across web/session and API/JSON flows. Activates when creating or updating controller tests, nested resource route tests at any depth, CRUD action tests (create, destroy, edit, index, show, store, update), authorization and route-binding scope checks, validation datasets, transport-specific response assertions, and database persistence assertions.
npx skill4agent add hosmelq/agent-skills controller-testingcreatedestroyeditindexshowstoreupdategetpostpatchdeletegetJsonpostJsonpatchJsondeleteJsonpest-testing# Create file only when needed
php artisan make:test --pest Http/Controllers/<Name>ControllerTest --no-interaction
# Run only the affected file
php artisan test --compact tests/Feature/Http/Controllers/<Name>ControllerTest.php
# Optional focused rerun
php artisan test --compact --filter="<test name>"describe('<action>')createdestroyeditindexshowstoreupdatestoreupdatereferences/modes/api-json.mdstoreupdatedescribe(...)references/route-patterns.mdroute()references/actions/create.mddescribe('create')references/actions/destroy.mddescribe('destroy')references/actions/edit.mddescribe('edit')references/actions/index.mddescribe('index')references/actions/show.mddescribe('show')references/actions/store.mddescribe('store')validates fieldsreferences/actions/update.mddescribe('update')validates fieldsreferences/validation/store-validates-fields.mdstorereferences/validation/update-validates-fields.mdupdatereferences/validation/required-with-and-array.mdvalidates fieldsrequired_witharraystoreupdatereferences/validation/scoped-exists-and-unique.mdexistsuniqueignore(...)updatereferences/validation/prepare-for-validation.mdprepareForValidation()references/validation/api-login-validation.mdemail requestemail loginreferences/modes/api-json.mdassertForbidden()scopeBindingsassertNotFound()403404404403requires authenticationassertRedirectBackWithErrors(...)assertOk()assertInertia(...)assertToast(...)requires authenticationassertUnauthorized()requires authenticationassertUnprocessable()assertJsonValidationErrors(...)assertOk()assertCreated()assertNoContent()login()destroyassertSoftDeleted(...)SoftDeletesassertModelMissing(...)idpublic_id