Fix tests

This commit is contained in:
ErickSkrauch
2019-12-05 00:52:27 +03:00
parent a81ef5cac2
commit 25f1ca912c
8 changed files with 70 additions and 249 deletions

View File

@@ -1,13 +1,18 @@
<?php
declare(strict_types=1);
namespace common\tests\_support;
use ReflectionClass;
/**
* @deprecated
*/
trait ProtectedCaller {
protected function callProtected($object, string $function, ...$args) {
protected function callProtected(object $object, string $methodName, ...$args) {
$class = new ReflectionClass($object);
$method = $class->getMethod($function);
$method = $class->getMethod($methodName);
$method->setAccessible(true);
return $method->invokeArgs($object, $args);