| name | testing |
|---|---|
| description | Use when writing PHPUnit tests, mocks under tests/Mock, or coverage/output under build/ for this package. |
- Adding or updating unit tests for
Utils,GQL, models, or helpers - Extending mocks/fixtures under
tests/Mockortests/Helpers - Interpreting PHPUnit config, coverage, or CI test runs
- Command:
composer test→ PHPUnit (phpunit/phpunit^9.3). - Config:
phpunit.xml— bootstrapvendor/autoload.php, suite directorytests/, whitelist coverage onsrc/.
- Test classes live directly under
tests/(e.g.UtilsTest.php,GQLTest.php,MetadataTest.php) plustests/Mock/(JsonMock.php,EmbedObjectMock.php, etc.) andtests/Helpers/(Utility.php).
phpunit.xmllogs JUnit, coverage (HTML, text, Clover), and testdox output underbuild/(e.g.build/coverage/,build/logs/). Addbuild/to.gitignoreif generating locally; do not commit generated artifacts unless the project asks for them.
CONTRIBUTING.mdrequires tests for changes; new behavior should include PHPUnit coverage in the same PR where feasible.
- Tests use mocks and fixtures; do not add real API keys or stack secrets to the repo.