kherge / providence
Makes testing through reflection easy.
Installs: 148
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
Open Issues: 1
pkg:composer/kherge/providence
Requires
- php: >=7.1
This package is not auto-updated.
Last update: 2020-01-10 05:03:13 UTC
README
Makes testing through reflection easy.
This library will simply provide a decorator class around any other class instance. The decorator class will provide access to all private and protected class properties and methods.
Requirements
- PHP 7.1+
Installing
composer require --dev kherge/providence
Usage
use KHerGe\Providence\Eye; /** * An example class with private members. */ class Example { private $property = 'The property value.'; private function method() { echo "The method.\n"; } } // Create an instance of the class. $example = new Example(); // Create a instance of the decorator. $eye = new Eye($example); // Access members as if they were public! echo $eye->property, "\n"; $eye->method();