Download the PHP package phrity/net-mock without Composer
On this page you can find all versions of the php package phrity/net-mock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phrity/net-mock
More information about phrity/net-mock
Files in phrity/net-mock
Package net-mock
Short Description Mock layer for phrity/net-stream
License MIT
Homepage https://phrity.sirn.se/
Informations about the package net-mock
Introduction
Writing tests that use streams is problematic. This library provides a mocking layer for phrity/net-stream, allowing developers to verify and mock stream interactions.
Installation
Install with Composer;
Usage
The classes in this library are fully compatible with those of the net-stream library. By default, calling the mock classes will propagate into the real implementation classes.
Log interactions
By adding a PSR-3 compatible logger, all calls will be logged. The library includes a simple EchoLogger, but any compatible logger is usable.
Mock interactions
By registring a callback handler, all calls will pass through the callback instead.
Versions
Version | PHP | |
---|---|---|
2.1 |
^8.0 |
phrity/net-stream v2.1 |
2.0 |
^8.0 |
phrity/net-stream v2.0 |
1.3 |
^7.4\|^8.0 |
phrity/net-stream v1.3 |
1.2 |
^7.4\|^8.0 |
phrity/net-stream v1.2 |
1.1 |
^7.4\|^8.0 |
phrity/net-stream v1.1 |
1.0 |
^7.4\|^8.0 |
phrity/net-stream v1.0 |
All versions of net-mock with dependencies
phrity/net-stream Version ^2.1
phrity/net-uri Version ^2.0
psr/log Version ^1.0 | ^2.0 | ^3.0