|
|
@@ -2,6 +2,8 @@
|
|
|
|
|
|
namespace Tools\TestSuite;
|
|
|
|
|
|
+use ReflectionClass;
|
|
|
+
|
|
|
/**
|
|
|
* Utility methods for easier testing in CakePHP & PHPUnit
|
|
|
*/
|
|
|
@@ -85,9 +87,8 @@ trait ToolsTestTrait {
|
|
|
*
|
|
|
* @return mixed Method return.
|
|
|
*/
|
|
|
- protected function invokeMethod(&$object, $methodName, array $parameters = [])
|
|
|
- {
|
|
|
- $reflection = new \ReflectionClass(get_class($object));
|
|
|
+ protected function invokeMethod(&$object, $methodName, array $parameters = []) {
|
|
|
+ $reflection = new ReflectionClass(get_class($object));
|
|
|
$method = $reflection->getMethod($methodName);
|
|
|
$method->setAccessible(true);
|
|
|
|