Laravel Controller Tests

🌐Community
by noartem · vlatest · Repository

This skill generates Laravel controller test cases automatically, streamlining testing and ensuring robust application logic.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add laravel-controller-tests npx -- -y @trustedskills/laravel-controller-tests
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "laravel-controller-tests": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/laravel-controller-tests"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill allows AI agents to generate and execute tests for Laravel controllers. It automates the process of verifying controller functionality, ensuring that routes are handled correctly and expected responses are returned. The agent can create tests based on provided descriptions or existing controller code.

When to use it

  • Automated testing: Quickly generate basic tests for new Laravel controllers during development.
  • Regression testing: Ensure changes to controllers don't break existing functionality by automatically re-running generated tests.
  • Code refactoring: Verify that controller logic remains correct after code modifications.
  • Documentation generation: Create test suites that serve as executable documentation for controller behavior.

Key capabilities

  • Test generation from descriptions
  • Test execution within a Laravel environment
  • Verification of route handling and responses
  • Integration with existing testing frameworks (e.g., PHPUnit)

Example prompts

  • "Generate a test for the UserController@register method."
  • "Create tests to verify that the ProductController@index method returns a list of products."
  • “Write a test case for the AuthController@login method, asserting that it redirects to the dashboard on success.”

Tips & gotchas

  • Requires a Laravel development environment with PHP and Composer installed.
  • The skill's generated tests are basic; manual adjustments may be needed for complex scenarios or edge cases.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
noartem
Installs
14

🌐 Community

Passed automated security scans.