Download the PHP package n4m-ward/laravel-perry without Composer
On this page you can find all versions of the php package n4m-ward/laravel-perry. 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 laravel-perry
Perry - Swagger generator library using e2e tests
Summary
Setup
Creating Tests
Usage examples
Doing assertions
Setup
Install the library:
Run the following command once to generate the configuration files
After running the command above, two files will be created
-
A
perry.json
file containing the following data: - A
BaseTestCase.php
file that you will extend in your e2e tests - The
BaseTestCase
will be created in the following path:/tests/Perry/BaseTestCase.php
- You can change the path of this file if you want, or use your own
BaseTestCase
Creating Tests
- First, create a class extending the
BaseTestCase
created above -
For example, an
UserControllerTest
-
Then let's create our first e2e test
-
Then run the following command
- So, the following documentation will be created on the path
perry_output/swagger/output.yaml
Usage examples
Request using header
Request using body
Request using body and headers
Available http methods
Using securityScheme
First, on your TestCase or your BaseTestCase, add the following attribute
Then, on your test method, add the following attribute
Using tags
First add the Tag
attribute on your TestCase or your BaseTestCase
If you want, you can add the externalDocs to your tag
Then, on your test method, add the UsingTag
attribute
Doing assertions
- The method
perryHttp()
will return anIlluminate\Testing\TestResponse
- With the
TestResponse
, we can do some assertions as we can see bellow - You can see all available assertions for
TestResponse
Clicking here
All versions of laravel-perry with dependencies
PHP Build Version
Package Version
Requires
ext-yaml Version
*
The package n4m-ward/laravel-perry contains the following files
Loading the files please wait ....