Send Single Notification Sender.
public sendSingle ( array $infoNotifications, $category ) : |
||
$infoNotifications | array | |
$category | ||
리턴 |
/** @test */ function it_send_one_notification(SenderFactory $senderFactory, DefaultSender $sender, StoreNotification $storeNotification) { $notifications = []; $category = 1; $senderFactory->sendSingle($notifications, $category)->shouldBeCalled()->willReturn($sender); $sender->send($storeNotification, $category)->shouldBeCalled()->willReturn(1); $this->sendOne($notifications, $category)->shouldReturn(1); }
/** * Send one method to get fully working * older version * * @param $info * @param $category * @return SendOne */ public function sendOne($info, $category = null) { return $this->senderFactory->sendSingle($info, $category)->send($this->storeNotification, $category); }