fix: php unit startup command

This commit is contained in:
2026-05-29 18:23:36 +02:00
parent f3770f1c2a
commit b3e79de069
2 changed files with 7 additions and 10 deletions
+7 -7
View File
@@ -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
-3
View File
@@ -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,