I updated Doctrine 2.5 to 2.6 in my project and phpspec is broken.
The function getEntityChangeSet() is now returned by reference. It seems not to be supported by phpspec.
$unitOfWork
    ->getEntityChangeSet($site)
    ->willReturn(['_dataParent' => [0 => 2, 1 => 3]]);
The response is
returning by reference not supported
the underlying function (doctrine/doctrine2) is
public function & getEntityChangeSet($entity)
{
    $oid  = spl_object_hash($entity);
    $data = [];
    if (!isset($this->entityChangeSets[$oid])) {
        return $data;
    }
    return $this->entityChangeSets[$oid];
}
Do you know if it's possible to bypass this or change test for make it work?