Agent skill

laravel-controller-tests

Write focused controller tests using HTTP assertions; keep heavy logic in Actions/Services and unit test them

Stars 6
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/noartem/skills/tree/main/skills/laravel-controller-tests

SKILL.md

Controller Tests

Feature tests for endpoints

php
it('rejects empty email', function () {
  $this->post('/register', ['email' => ''])->assertSessionHasErrors('email');
});

Better tests

  • Move validation to Form Requests; assert errors from the request class
  • Extract business logic into Actions; unit test them directly
  • Use factories for realistic data; avoid heavy mocking

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results