forked from syntaxerrors/Steam
-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
TeemoCell edited this page Jul 20, 2026
·
2 revisions
composer installThe construction, Laravel binding and current-endpoint tests use mocked HTTP responses and do not require a real Steam API key:
php vendor/bin/phpunit --filter "AppListTest|ClientConstructionTest|CurrentApiEndpointsTest|UserStatsResponseTest|LaravelClientBindingTest"Live API tests need a valid key and depend on Steam, profile visibility and network availability.
PowerShell:
$env:STEAM_API_KEY = 'your-key-here'
php vendor\bin\phpunitBash:
STEAM_API_KEY=your-key-here php vendor/bin/phpunitNever paste a real API key into issue descriptions, test output or committed configuration.
composer validate --strict --no-check-publish
composer audit --lockedCheck proposed automated refactors without changing files:
php vendor/bin/rector process --dry-rundocker-compose build
docker-compose run --rm php composer install
docker-compose run --rm php composer testPass STEAM_API_KEY into the container only for the live suite.
Prefer Guzzle mock responses and history middleware for endpoint URL, API version and query-parameter assertions. This keeps CI deterministic and prevents accidental API-key exposure.
Documentation for teemocell/steam-web-api · Licensed under the MIT License