This could be simplified using prophecy if https://github.com/phpspec/prophecy/blob/master/src/Prophecy/Argument/Token/ObjectStateToken.php supported properties