Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings
psr-mock

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PSR Mock

Lightweight mocking libraries for PSR implementations, tailor-made to help you create test suites that are easier to write and maintain.

Lightweight mocking libraries for PSR implementations, tailor-made to help you create test suites that are easier to write and maintain.

Each of these libraries provide a mock of a particular PHP-FIG PSR implementation. The suite currently offers PSR-18 HTTP Clients, PSR-17 HTTP Factories and PSR-7 HTTP Message implementations, with more on the way.

These are largely intended for use in libraries like SDKs that consume PSR implementations without requiring hard dependencies on specific libraries. These libraries also provide additional APIs that further simplify unit testing, while strictly adhering to the PSR specification and offering the most accurate representation of what a real world usage will look like.

These packages pair nicely with the PSR Discovery suite, which can automatically detect the presence of any of these mock implementations in your development environment and will prefer them during unit test runs without extra configuration.


These libraries are not produced or endorsed by, or otherwise affiliated with, the PHP-FIG.

Pinned Loading

  1. http-client-implementation http-client-implementation Public

    Lightweight mocking library for PSR-18 HTTP Client implementations, tailor-made to help you create test suites that are easier to write and maintain.

    PHP 1

  2. http-factory-implementation http-factory-implementation Public

    Lightweight mocking library for PSR-17 HTTP Factory and PSR-7 HTTP Message implementations, tailor-made to help you create test suites that are easier to write and maintain.

    PHP

  3. http-message-implementation http-message-implementation Public

    Lightweight mocking library for PSR-7 HTTP Message implementations, tailor-made to help you create test suites that are easier to write and maintain.

    PHP 1

Repositories

Loading
Type
Select type
Language
Select language
Sort
Select order
Showing 10 of 14 repositories

Top languages

Loading...

Most used topics

Loading...