Working with PHP Prophecy now. I have two codes samples: One:
$aProphecy = $this->prophesize(A::class);
$aProphecy->someMethod()->willReturn([]);
//now can be used:
$aProphecy->reveal();
Two
$aProphecy = $this->prophesize(A::class);
$aProphecy->reveal();
$aProphecy->someMethod()->willReturn([]);
I can't understand which is the correct way, and why?
Aucun commentaire:
Enregistrer un commentaire