Registry / testing / icecave-isolator

icecave-isolator

JSON →
library3.0.3phppackagistunverified

Provides dependency injection for global functions, enabling testability.

composer require icecave/isolator
INSTALL
IMPORT
SIG · ICECAVE-ISOLATOR
I
icecave-isolator
testingphpv3.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Isolator
use Icecave\Isolator\Isolator;

Create an isolator to mock global functions.

use Icecave\Isolator\Isolator; $isolator = new Isolator(); $isolator->register(); // Now global functions like time() can be mocked $isolator->time = function () { return 1234567890; };
Debug
Known issues
breakingRequires PHP 7.0 or later; older versions not supported.
fix
Upgrade PHP to 7.0+.
affects: <3.0.0
Upgrade
Version history
3.0.3latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
icecave-isolator — pip install icecave-isolator · libregistry