Access private functions and properties of PHP classes. Primarily used to muck with things under test.
Via Composer
$ composer require kidfund/monkey-patcherNote: If you are using this, you may have a broken pattern somewhere. Either in your main code or in test-land. But, sometimes you need it!
Add the trait to your test
class MonkeyPatcherUnitTest extends PHPUnit_Framework_TestCase
{
use MonkeyPatcher;$this->invokeMethod($object, 'do', ['something']);$this->setProperty($object, 'msg', 'hello');$this->getProperty($object, 'msg');$ ./vendor/bin/phpunitPlease see CONTRIBUTING and CONDUCT for details.
The MIT License (MIT). Please see License File for more information.