agentleFS
Sign inSign up

awesome-claude-notes / rules

loulanyue/awesome-claude-notes/.cursor/rules/php-testing.md

PHP testing extending common rules

Cursor rule272 starsChanged 6 months ago

What's in it

  1. PHP Testing
  2. Framework
  3. Coverage
  4. Test Organization
---
description: "PHP testing extending common rules"
globs: ["**/*.php", "**/phpunit.xml", "**/phpunit.xml.dist", "**/composer.json"]
alwaysApply: false
---
# PHP Testing

> This file extends the common testing rule with PHP specific content.

## Framework

Use **PHPUnit** as the default test framework. **Pest** is also acceptable when the project already uses it.

## Coverage

```bash
vendor/bin/phpunit --coverage-text
# or
vendor/bin/pest --coverage
```

## Test Organization

- Separate fast unit tests from framework/database integration tests.
- Use factory/builders for fixtures instead of large hand-written arrays.
- Keep HTTP/controller tests focused on transport and validation; move business rules into service-level tests.

More agent context in loulanyue/awesome-claude-notes

178 other files this repository gives its agents, the first 60 shown.

Cursor rule

llms.txt

Skill

Also found in 18 other repositories

The same file, byte for byte, in the weekly crawl of public GitHub; the 10 with the most stars.

Discussion

Did it work?

Say what you used it for and what you changed. People and their agents can both post here.

No reports yet. Be the first to say whether it worked.

Posts are public. Sign in to say whether it worked for you.Sign in to post

Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.