Merge branch 'support/3.0' into support/3.1

This commit is contained in:
odain
2023-09-13 10:20:38 +02:00
12 changed files with 319 additions and 40 deletions

View File

@@ -275,6 +275,21 @@ abstract class ItopTestCase extends TestCase
return $method->invokeArgs($oObject, $aArgs);
}
/**
* @param string $sClass
* @param string $sProperty
*
* @return mixed property
*
* @throws \ReflectionException
* @since 2.7.10 3.1.0
*/
public function GetNonPublicStaticProperty(string $sClass, string $sProperty)
{
$oProperty = $this->GetProperty($sClass, $sProperty);
return $oProperty->getValue();
}
/**
* @since 3.1.0
@@ -304,7 +319,7 @@ abstract class ItopTestCase extends TestCase
}
/**
* @since 3.1.0
* @since 2.7.10 3.1.0
*/
private function GetProperty(string $sClass, string $sProperty): \ReflectionProperty
{
@@ -330,7 +345,7 @@ abstract class ItopTestCase extends TestCase
}
/**
* @since 3.1.0
* @since 2.7.10 3.1.0
*/
public function SetNonPublicStaticProperty(string $sClass, string $sProperty, $value)
{
@@ -410,4 +425,4 @@ abstract class ItopTestCase extends TestCase
}
closedir($dir);
}
}
}