| 1 | <?php |
||
| 9 | class TestHelper |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Call protected/private method of a class |
||
| 13 | * |
||
| 14 | * @param Object $object |
||
| 15 | * @param string $methodName |
||
| 16 | * @param array $parameters |
||
| 17 | * @return mixed |
||
| 18 | * @throws \ReflectionException |
||
| 19 | * |
||
| 20 | * @link https://jtreminio.com/blog/unit-testing-tutorial-part-iii-testing-protected-private-methods-coverage-reports-and-crap/ |
||
| 21 | */ |
||
| 22 | public static function invokeMethod(&$object, $methodName, array $parameters = array()) |
||
| 30 | } |
||
| 31 |