diff --git a/CLAUDE.md b/CLAUDE.md index 8eb2b8d..d656647 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -71,7 +71,7 @@ The tests are written and failing. Now implement the minimum code to make them p ``` Tests are green. Refactor the implementation for [readability / removing duplication / naming]. -Run php bin/phpunit after each change to confirm tests stay green. +Run vendor/bin/phpunit after each change to confirm tests stay green. ``` **Common anti-patterns** @@ -87,16 +87,16 @@ Run php bin/phpunit after each change to confirm tests stay green. ```bash # Run full suite -php bin/phpunit +vendor/bin/phpunit # Run with human-readable output -php bin/phpunit --testdox +vendor/bin/phpunit --testdox # Run a single test file -php bin/phpunit tests/Unit/Service/SvgRendererTest.php +vendor/bin/phpunit tests/Unit/Service/SvgRendererTest.php # Run tests matching a filter -php bin/phpunit --filter it_renders +vendor/bin/phpunit --filter it_renders ``` ### Auto-run hook @@ -109,7 +109,7 @@ Add to `.claude/settings.json` to run PHPUnit automatically after every file edi "PostToolUse": [ { "matcher": "Edit|Write", - "command": "php bin/phpunit 2>&1 | tail -20" + "command": "vendor/bin/phpunit 2>&1 | tail -20" } ] } @@ -130,7 +130,7 @@ docker compose up -d --build docker compose exec graph sh # Run tests inside the container -docker compose exec graph php bin/phpunit +docker compose exec graph vendor/bin/phpunit # Disable Xdebug for faster test runs XDEBUG_MODE=off docker compose up -d diff --git a/composer.json b/composer.json index fb90a4d..31c3718 100644 --- a/composer.json +++ b/composer.json @@ -29,9 +29,6 @@ "phpunit/phpunit": "^11.5", "symfony/phpunit-bridge": "^7.4" }, - "scripts": { - "test": "php bin/phpunit" - }, "config": { "optimize-autoloader": true, "sort-packages": true,