A suite of helper methods to test REST APIs.
- Require-dev the composer package
- Extend your base API test case from
Fuzz\RestTests\BaseRestTestCase - Adjust
setUpandtearDownas needed. The tests for this package are a good example of how to use it.- This package extends
orchestra/testbenchso all available functionality is present inrest-tester
- This package extends
Fuzz\RestTests\BaseRestTestCaseprovides some helper methods to configure tests for a RESTful API
Fuzz\RestTests\Resources\RestfulResourceprovides helper methods to test endpoints for restful resources- Add
Fuzz\RestTests\Resources\TestResourceX(where X is the resource action) traits depending on which actions need to be tested
Fuzz\RestTests\AuthTraits\OAuthTraitprovides methods to authenticate, refresh tokens, retrieve tokens from request objects, create users/clients with scopes, etc.
Run phpunit after composer install.