$this->
assertInstanceOf(ObjectOuter::
class,
$outer);
$inner =
$outer->
getInner();
$this->
assertInstanceOf(ObjectInner::
class,
$inner);
$this->
assertNotSame($objectToPopulate,
$inner);
$this->
assertSame('bar',
$inner->bar
);
$this->
assertNull($inner->foo
);
} public function testDeepObjectToPopulate() { $child =
new DeepObjectPopulateChildDummy();
$child->bar = 'bar-old';
$child->foo = 'foo-old';
$parent =
new DeepObjectPopulateParentDummy();
$parent->
setChild($child);
$context =
[ 'object_to_populate' =>
$parent,
'deep_object_to_populate' => true,
];