fix: overrides being used on regular phpunit

This commit is contained in:
Nuno Maduro
2022-12-28 14:21:07 +00:00
parent 37b1367d25
commit 406fcf72ae
5 changed files with 45 additions and 11 deletions

View File

@ -12,6 +12,7 @@ use ReflectionException;
use ReflectionFunction;
use ReflectionNamedType;
use ReflectionParameter;
use ReflectionProperty;
use ReflectionUnionType;
/**
@ -95,7 +96,7 @@ final class Reflection
$reflectionProperty = null;
while ($reflectionProperty === null) {
while (! $reflectionProperty instanceof ReflectionProperty) {
try {
/* @var ReflectionProperty $reflectionProperty */
$reflectionProperty = $reflectionClass->getProperty($property);
@ -127,7 +128,7 @@ final class Reflection
$reflectionProperty = null;
while ($reflectionProperty === null) {
while (! $reflectionProperty instanceof ReflectionProperty) {
try {
/* @var ReflectionProperty $reflectionProperty */
$reflectionProperty = $reflectionClass->getProperty($property);