Download the PHP package eerison/pest-plugin-api-platform without Composer
On this page you can find all versions of the php package eerison/pest-plugin-api-platform. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package pest-plugin-api-platform
Api platform for Pest
This package adds Api platform testing capabilities to Pest.
Installation
You can install the package via composer:
Add uses(ApiTestCase::class) in your tests/Pest.php
Usage
or you can use importing the function
using findIriBy
using snapshot (please install pest-plugin-snapshots)
Converting api platform test in pest
Before
After
Expectations
toMatchesResourceCollectionJsonSchema(Your::class)toMatchesResourceItemJsonSchema(Your::class)
Functions
apiClient()get()post()put()delete()findIriBy()assertResponseIsSuccessful()assertResourceIsBadRequest()assertResourceIsNotFound()assertResourceIsUnauthorized()assertResourceIsForbidden()assertMatchesResourceItemJsonSchema(Your::class)assertMatchesResourceCollectionJsonSchema(Your::class)assertResourceIsBadRequest()assertResourceIsUnprocessableEntity()expectResponseContent()
if you want to test
expectResponseContentand not return an exception passfalseas parameter, example:expectResponseContent(false)
Testing
Credits
- Nuno Maduro
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of pest-plugin-api-platform with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.4 || ^8.0
api-platform/core Version ^2.6
pestphp/pest Version ^1.0
pestphp/pest-plugin Version ^1.0
api-platform/core Version ^2.6
pestphp/pest Version ^1.0
pestphp/pest-plugin Version ^1.0
The package eerison/pest-plugin-api-platform contains the following files
Loading the files please wait ...