mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Fix tests
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user