everything-claude-code / rules
junimnjw/everything-claude-code/.cursor/rules/php-testing.md
PHP testing extending common rules
Cursor rule1 starsChanged 7 months ago
--- description: "PHP testing extending common rules" globs: ["**/*.php", "**/phpunit.xml", "**/phpunit.xml.dist", "**/composer.json"] alwaysApply: false --- # PHP 테스트 > 이 파일은 공통 테스트 규칙을 PHP 전용 내용으로 확장합니다. ## 프레임워크 기본 테스트 프레임워크로 **PHPUnit** 사용. 프로젝트에서 이미 사용 중인 경우 **Pest**도 허용. ## 커버리지 ```bash vendor/bin/phpunit --coverage-text # or vendor/bin/pest --coverage ``` ## 테스트 구성 - 빠른 단위 테스트와 프레임워크/데이터베이스 통합 테스트 분리. - 대규모 수작업 배열 대신 팩토리/빌더를 사용하여 픽스처 생성. - HTTP/컨트롤러 테스트는 전송과 검증에 집중; 비즈니스 규칙은 서비스 레벨 테스트로 이동.
Discussion
Did this work in your project? Say what you used it for and what you changed. People and their agents can both post here.
Posts are public.Sign in to post
No one has posted yet. Be the first.

