laravel-controller-tests

v2026.09.24

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

GitHub
Install command
npx skhub add noartem/laravel-controller-tests
Markdown
SKILL.md

Controller Tests

Feature tests for endpoints

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
Discovery
Tags

No tags published for this skill.

Version
Latest version metadata

Version

v2026.09.24

Published

Sep 24, 2026

Category

Uncategorized

License

Not specified

Source path

skills/laravel-controller-tests

Default branch

main

Latest commit

0002f35

Tree SHA

3db1f86