Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maks3w/psr7assertions
Test your library conformance with PSR-7
https://github.com/maks3w/psr7assertions
Last synced: about 2 months ago
JSON representation
Test your library conformance with PSR-7
- Host: GitHub
- URL: https://github.com/maks3w/psr7assertions
- Owner: Maks3w
- License: other
- Created: 2015-06-08T09:35:32.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-16T13:39:44.000Z (over 8 years ago)
- Last Synced: 2024-08-20T14:05:36.700Z (4 months ago)
- Language: PHP
- Homepage:
- Size: 25.4 KB
- Stars: 17
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# PSR-7 Assertions
[![Build Status](https://travis-ci.org/Maks3w/Psr7Assertions.svg?branch=master)](https://travis-ci.org/Maks3w/Psr7Assertions)
[![Coverage Status](https://coveralls.io/repos/Maks3w/Psr7Assertions/badge.svg?branch=master)](https://coveralls.io/r/Maks3w/Psr7Assertions?branch=master)Test if your HTTP messages are compliant with the [PSR-7 (HTTP message interfaces) specification](http://www.php-fig.org/psr/psr-7/).
## Installation
Use [Composer](https://getcomposer.org) to install this library:
```bash
composer require maks3w/psr7-assertions
```## Usage in PHPUnit
`Psr7Assertions` provides following traits with helper functions for asserting interface constraints:
- [MessageInterfaceTestsTrait](src/PhpUnit/MessageInterfaceTestsTrait.php) for testing `MessageInterface` implementations.
- [RequestInterfaceTestsTrait](src/PhpUnit/RequestInterfaceTestsTrait.php) for testing `RequestInterface` implementations.
- [ResponseInterfaceTestsTrait](src/PhpUnit/ResponseInterfaceTestsTrait.php) for testing `ResponseInterface` implementations.
- [ServerRequestInterfaceTestsTrait](src/PhpUnit/ServerRequestInterfaceTestsTrait.php) for testing `ServerRequestInterface` implementations.See examples at [example/PhpUnit](example/PhpUnit).
## License
Code licensed under BSD 2 clauses terms & conditions.
See [LICENSE.txt](LICENSE.txt) for more information.