sendSingle() public method

Send Single Notification Sender.
public sendSingle ( array $infoNotifications, $category ) : SendOne
$infoNotifications array
$category
return SendOne
 /** @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);
 }
示例#2
0
 /**
  * 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);
 }