I can't seem to Mock a mail call for a codception test. This is what I'm trying, but the mocked object is never called. Does anyone have a clue why this would be the case. I'm pretty sure it's the wrong ioc object.
$I->haveBinding('mailer',function(){
$mail = \Mockery::mock(Mailer::class);
$mail->shouldReceive("send")->with(\Mockery::any(),\Mockery::any(),\Mockery::any())->once();
return $mail;
});
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire