maks3w / psr7-assertions
Test your library conformance with PSR-7
dev-master
2016-04-16 13:39 UTC
Requires
- php: >= 5.4
- phpunit/phpunit: ^4 || ^5
- psr/http-message: ~1.0
Requires (Dev)
- fabpot/php-cs-fixer: 1.9.*
- maks3w/phpunit-methods-trait: ^4.6
This package is auto-updated.
Last update: 2024-11-15 20:52:30 UTC
README
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
MessageInterface
implementations. - RequestInterfaceTestsTrait for testing
RequestInterface
implementations. - ResponseInterfaceTestsTrait for testing
ResponseInterface
implementations. - ServerRequestInterfaceTestsTrait for testing
ServerRequestInterface
implementations.
See examples at example/PhpUnit.
License
Code licensed under BSD 2 clauses terms & conditions.
See LICENSE.txt for more information.