|
@@ 25-39 (lines=15) @@
|
| 22 |
|
} |
| 23 |
|
|
| 24 |
|
/** @test */ |
| 25 |
|
public function it_send_now_a_notification(SenderFactory $senderFactory, |
| 26 |
|
DefaultSender $sender, |
| 27 |
|
StoreNotification $storeNotification) |
| 28 |
|
{ |
| 29 |
|
$notifications = []; |
| 30 |
|
$category = 1; |
| 31 |
|
|
| 32 |
|
$senderFactory->getSender($notifications, $category)->shouldBeCalled() |
| 33 |
|
->willReturn($sender); |
| 34 |
|
|
| 35 |
|
$sender->send($storeNotification)->shouldBeCalled() |
| 36 |
|
->willReturn(1); |
| 37 |
|
|
| 38 |
|
$this->sendNow($notifications, $category)->shouldReturn(1); |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
/** @test */ |
| 42 |
|
public function it_send_one_notification(SenderFactory $senderFactory, |
|
@@ 42-56 (lines=15) @@
|
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
/** @test */ |
| 42 |
|
public function it_send_one_notification(SenderFactory $senderFactory, |
| 43 |
|
DefaultSender $sender, |
| 44 |
|
StoreNotification $storeNotification) |
| 45 |
|
{ |
| 46 |
|
$notifications = []; |
| 47 |
|
$category = 1; |
| 48 |
|
|
| 49 |
|
$senderFactory->sendSingle($notifications, $category)->shouldBeCalled() |
| 50 |
|
->willReturn($sender); |
| 51 |
|
|
| 52 |
|
$sender->send($storeNotification, $category)->shouldBeCalled() |
| 53 |
|
->willReturn(1); |
| 54 |
|
|
| 55 |
|
$this->sendOne($notifications, $category)->shouldReturn(1); |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
/** @test */ |
| 59 |
|
public function it_send_multiple_notification(SenderFactory $senderFactory, |