/** * @param \Namshi\Notificator\Notification\Sms\SmsNotification $notification * @param \Namshi\SMSCountry\Client $client */ function it_handles_sms_notification($notification, $client) { $notification->getRecipientNumber()->willReturn('Number')->shouldBeCalled(); $notification->getMessage()->willReturn('body')->shouldBeCalled(); $this->handle($notification)->shouldBe(true); $client->sendSms('Number', 'body')->shouldBeCalled(); }
public function testSendingUnicodeMessageCallsSendUnicodeSMSSoapMethod() { $unicodeResponse = (object) array("SendUnicodeSMSResult" => true); $this->clientMock->expects($this->once())->method('SendUnicodeSMS')->with(array("username" => $this->username, "password" => $this->password, "mobilenumbers" => $this->normalizedPhoneNumber, "message" => $this->unicodeString, "senderID" => $this->senderId))->will($this->returnValue($unicodeResponse)); $this->client->sendSms($this->phoneNumber, $this->unicodeString); }