Skip to content
@psr-mock

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

Showing 10 of 14 repositories
  • .github Public
    psr-mock/.github’s past year of commit activity
    0 MIT 0 0 0 Updated Mar 5, 2024
  • 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.

    psr-mock/http-message-implementation’s past year of commit activity
    PHP 0 MIT 1 0 0 Updated Mar 5, 2024
  • 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.

    psr-mock/http-factory-implementation’s past year of commit activity
    PHP 0 MIT 0 0 0 Updated Mar 5, 2024
  • 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.

    psr-mock/http-client-implementation’s past year of commit activity
    PHP 1 MIT 0 0 0 Updated Mar 5, 2024
  • http-request-handler-implementation Public

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

    psr-mock/http-request-handler-implementation’s past year of commit activity
    0 MIT 0 0 0 Updated Mar 5, 2024
  • event-dispatcher-implementation Public

    Svelte PSR-14 Event Dispatcher implementation provider for use in unit testing.

    psr-mock/event-dispatcher-implementation’s past year of commit activity
    0 MIT 0 0 0 Updated Mar 4, 2024
  • simple-cache-implementation Public

    Svelte PSR-16 Simple Cache implementation provider for use in unit testing.

    psr-mock/simple-cache-implementation’s past year of commit activity
    0 MIT 0 0 0 Updated Mar 4, 2024
  • container-implementation Public

    Svelte PSR-11 Container implementation provider for use in unit testing.

    psr-mock/container-implementation’s past year of commit activity
    0 MIT 0 0 0 Updated Mar 4, 2024
  • clock-implementation Public

    Svelte PSR-20 Clock implementation provider for use in unit testing.

    psr-mock/clock-implementation’s past year of commit activity
    0 MIT 0 0 0 Updated Mar 4, 2024
  • cache-implementation Public

    Svelte PSR-6 Cache implementation provider for use in unit testing.

    psr-mock/cache-implementation’s past year of commit activity
    0 MIT 0 0 0 Updated Mar 4, 2024

Top languages

Loading…

Most used topics

Loading…