mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Reflection > getPropertyValue() method > look for the property in parent classes
This commit is contained in:
@@ -309,6 +309,12 @@ class ReflectionTest extends BaseTestCase
|
||||
self::assertEquals($username, Reflection::getPropertyValue($f, 'username'));
|
||||
}
|
||||
|
||||
public function testGetPropertyValueFromParentClass(): void
|
||||
{
|
||||
$c = new C();
|
||||
self::assertEquals(1, Reflection::getPropertyValue($c, 'count', true));
|
||||
}
|
||||
|
||||
public function testGetPropertyValuesFromEmptySource()
|
||||
{
|
||||
self::assertEquals([], Reflection::getPropertyValues([], 'something'));
|
||||
|
||||
Reference in New Issue
Block a user