I have a class with a property getType that returns a string.
class MySpec extends ObjectBehavior
{
function it_should_return_a_true_dossier_validation_result_if_bigstatus_is_true(DossierItemInterface $dossierItem)
{
$dossierItem->getType()->willReturn('id');
$dossier->getDossierItems()->willReturn(new ArrayCollection(array($dossierItem)));
$this->validate($dossier)->isValid()->shouldReturn(true);
}
}
In my implementation I want to check or the $dossierItem->getType() === 'id' but this check always fails since $dossierItem->getType() is an object of type Prophecy\Prophecy\MethodProphecy.
Implementation class:
class Validator
{