0
興味深い問題があります。実行中...with Mockery :: on(Closure)を使用するとMockery NoMatchingExpectationExceptionがスローされます
$lenderMailer->shouldReceive('sendDonationMail')->once();
私のテストは問題なく終了します。しかし、私が試してみると:
$lenderMailer->shouldReceive('sendDonationMail')->once()->with(\Mockery::on(function(){
return true;
}));
私はNoMatchingExpectationExceptionを取得しています。 sendDonationMailメソッドのシグネチャは、
public function sendDonationMail(Lender $lender, Money $donationAmount)
例外がスローされる理由は何ですか?
本当 'sendDonationMail'メソッドのシグネチャは何ですか? –
質問に署名を追加しました。 – rreyes1979