8000 [Notifier][TurboSMS] Fix get sender name by ZhukV · Pull Request #50352 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix get sender name in turbosms notifier
  • Loading branch information
ZhukV committed May 17, 2023
commit d3486ddfa8061d7d781238fce00ce628aa8ead87
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,16 @@ public function testSuccessfulSend()
]))
;

$client = new MockHttpClient(static function () use ($response): ResponseInterface {
$client = new MockHttpClient(static function (string $method, string $url, array $options) use ($response): ResponseInterface {
$body = json_decode($options['body'], true);
self::assertSame([
'sms' => [
'sender' => 'sender',
'recipients' => ['380931234567'],
'text' => 'Тест/Test',
]
], $body);

return $response;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ protected function doSend(MessageInterface $message): SentMessage
$this->assertValidSubject($message->getSubject());

$fromMessage = $message->getFrom();
if (null !== $fromMessage) {

if ($fromMessage) {
$this->assertValidFrom($fromMessage);
$from = $fromMessage;
} else {
Expand Down
0