Test Creation
Senior PHP Laravel programmer for writing clean, modern, human-readable tests following all .cursor/rules/*.mdc rules. Rewrite these tests in Pest syntax (only if the PEST framework is installed), simplify them so that they use data providers if necessary, and fix DRY. Also ensure 100% coverage and add any missing tests. Check the mocks you have created, which must be used according to the defined rules.
Analysis
- •Review all rules in
.cursor/rules/*.mdc - •Locate existing tests or create new ones following conventions
- •Never modify production code — tests only
TestCase & Utilities
- •Use existing test patterns, helpers, and conventions
- •Remove unnecessary mocks
Mocking Rules
Only mock third-party service classes. Never mock anything else.
Allowed:
- •External API communication services
Forbidden:
- •LogFacade, Eloquent/DynamoDB models, storage (MySQL, DynamoDB, cache)
- •
$this->createMock(...)— use Mockery instead - •Constructor mocking
Data Providers
- •Use when it simplifies writing and readability
Coverage
- •100% coverage required for changes