mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Rework tests structure. Upgrade codeception to 2.5.3. Merge params configuration into app configuration.
This commit is contained in:
16
common/tests/_support/ProtectedCaller.php
Normal file
16
common/tests/_support/ProtectedCaller.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace common\tests\_support;
|
||||
|
||||
use ReflectionClass;
|
||||
|
||||
trait ProtectedCaller {
|
||||
|
||||
protected function callProtected($object, string $function, ...$args) {
|
||||
$class = new ReflectionClass($object);
|
||||
$method = $class->getMethod($function);
|
||||
$method->setAccessible(true);
|
||||
|
||||
return $method->invokeArgs($object, $args);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user