Psr7Assertions
Psr7Assertions copied to clipboard
Test your library conformance with PSR-7
PSR-7 Assertions
Test if your HTTP messages are compliant with the PSR-7 (HTTP message interfaces) specification.
Installation
Use Composer to install this library:
composer require maks3w/psr7-assertions
Usage in PHPUnit
Psr7Assertions provides following traits with helper functions for asserting interface constraints:
- MessageInterfaceTestsTrait for testing
MessageInterfaceimplementations. - RequestInterfaceTestsTrait for testing
RequestInterfaceimplementations. - ResponseInterfaceTestsTrait for testing
ResponseInterfaceimplementations. - ServerRequestInterfaceTestsTrait for testing
ServerRequestInterfaceimplementations.
See examples at example/PhpUnit.
License
Code licensed under BSD 2 clauses terms & conditions.
See LICENSE.txt for more information.