Patchwork is a PHP library that makes it possible to redefine user-defined functions and methods at runtime, replicating the functionality of runkit_function_redefine in pure PHP 5.3 code. It allows you to, among other things, replace static and private methods with test doubles.
|Tags||PHP Library redefinition function redefinition method redefinition monkey patching|
|Implementation||PHP 5.3 +|
Release Notes: No errors are thrown anymore if an opcode cache is enabled. An error is now thrown when including Patchwork.php if the PHP version is lower than 5.3.0.