public function reconstituteArrayWorksWithObjectsInTheArray()
{
$objectsAsArray = ['some object' => [ObjectSerializer::CLASSNAME => 'some object', ObjectSerializer::PROPERTIES => ObjectSerializer::PROPERTIES]];
$objectSerializer = $this->getAccessibleMock(ObjectSerializer::class, ['reconstituteObject'], [], '', false);
$objectSerializer->expects($this->once())->method('reconstituteObject')->with('some object', [ObjectSerializer::CLASSNAME => 'some object', ObjectSerializer::PROPERTIES => ObjectSerializer::PROPERTIES])->will($this->returnValue('reconstituted object'));
$objectSerializer->_set('objectsAsArray', $objectsAsArray);
$dataArray = ['key1' => [ObjectSerializer::TYPE => 'simple', ObjectSerializer::VALUE => 1], 'key2' => [ObjectSerializer::TYPE => 'object', ObjectSerializer::VALUE => 'some object']];
$expectedArrayProperty = ['key1' => 1, 'key2' => 'reconstituted object'];
$this->assertEquals($expectedArrayProperty, $objectSerializer->_call('reconstituteArray', $dataArray), 'The array was not reconstituted correctly.');
}