mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Tests > Reflection > getPropertyValues() method > make stronger verification of the dot-separated properties (get values of the chain)
This commit is contained in:
@@ -26,6 +26,7 @@ use Meritoo\Test\Common\Utilities\Reflection\F;
|
||||
use Meritoo\Test\Common\Utilities\Reflection\G;
|
||||
use Meritoo\Test\Common\Utilities\Reflection\H;
|
||||
use Meritoo\Test\Common\Utilities\Reflection\I;
|
||||
use Meritoo\Test\Common\Utilities\Reflection\J;
|
||||
use ReflectionProperty;
|
||||
|
||||
/**
|
||||
@@ -380,9 +381,13 @@ class ReflectionTest extends BaseTestCase
|
||||
public function testGetPropertyValuesFromChainAndSingleObject()
|
||||
{
|
||||
$f = new F(1000, 'New York', 'USA', 'john.scott');
|
||||
$j = new J();
|
||||
|
||||
self::assertEquals(['John'], Reflection::getPropertyValues($f, 'g.firstName'));
|
||||
self::assertEquals(['John'], Reflection::getPropertyValues($f, 'g.firstName', true));
|
||||
|
||||
self::assertEquals(['John'], Reflection::getPropertyValues($j, 'f.g.firstName'));
|
||||
self::assertEquals(['John'], Reflection::getPropertyValues($j, 'f.g.firstName', true));
|
||||
}
|
||||
|
||||
public function testGetPropertyValuesFromChainAndMultipleObjects()
|
||||
|
||||
Reference in New Issue
Block a user