8000 Fix NOWDOC in test · symfony/symfony@048994c · GitHub
[go: up one dir, main page]

Skip to content

Commit 048994c

Browse files
Fix NOWDOC in test
1 parent 1135a3e commit 048994c

File tree

1 file changed

+49
-44
lines changed

1 file changed

+49
-44
lines changed

src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -80,30 +80,33 @@ public function testSendWithOptions(): void
8080
$response->expects($this->exactly(2))
8181
->method('getStatusCode')
8282
->willReturn(200);
83+
84+
$content = <<<JSON
85+
{
86+
"ok": true,
87+
"result": {
88+
"message_id": 1,
89+
"from": {
90+
"id": 12345678,
91+
"first_name": "YourBot",
92+
"username": "YourBot"
93+
},
94+
"chat": {
95+
"id": 1234567890,
96+
"first_name": "John",
97+
"last_name": "Doe",
98+
"username": "JohnDoe",
99+
"type": "private"
100+
},
101+
"date": 1459958199,
102+
"text": "Hello from Bot!"
103+
}
104+
}
105+
JSON;
106+
83107
$response->expects($this->once())
84108
->method('getContent')
85-
->willReturn(<<<JSON
86-
{
87-
"ok": true,
88-
"result": {
89-
"message_id": 1,
90-
"from": {
91-
"id": 12345678,
92-
"first_name": "YourBot",
93-
"username": "YourBot"
94-
},
95-
"chat": {
96-
"id": 1234567890,
97-
"first_name": "John",
98-
"last_name": "Doe",
99-
"username": "JohnDoe",
100-
"type": "private"
101-
},
102-
"date": 1459958199,
103-
"text": "Hello from Bot!"
104-
}
105-
}
106-
JSON)
109+
->willReturn($content)
107110
;
108111

109112
$expectedBody = [
@@ -134,30 +137,32 @@ public function testSendWithChannelOverride(): void
134137
$response->expects($this->exactly(2))
135138
->method('getStatusCode')
136139
->willReturn(200);
140+
$content = <<<JSON
141+
{
142+
"ok": true,
143+
"result": {
144+
"message_id": 1,
145+
"from": {
146+
"id": 12345678,
147+
"first_name": "YourBot",
148+
"username": "YourBot"
149+
},
150+
"chat": {
151+
"id": 1234567890,
152+
"first_name": "John",
153+
"last_name": "Doe",
154+
"username": "JohnDoe",
155+
"type": "private"
156+
},
157+
"date": 1459958199,
158+
"text": "Hello from Bot!"
159+
}
160+
}
161+
JSON;
162+
137163
$response->expects($this->once())
138164
->method('getContent')
139-
->willReturn(<<<JSON
140-
{
141-
"ok": true,
142-
"result": {
143-
"message_id": 1,
144-
"from": {
145-
"id": 12345678,
146-
"first_name": "YourBot",
147-
"username": "YourBot"
148-
},
149-
"chat": {
150-
"id": 1234567890,
151-
"first_name": "John",
152-
"last_name": "Doe",
153-
"username": "JohnDoe",
154-
"type": "private"
155-
},
156-
"date": 1459958199,
157-
"text": "Hello from Bot!"
158-
}
159-
}
160-
JSON)
165+
->willReturn($content)
161166
;
162167

163168
$expectedBody = [

0 commit comments

Comments
 (0)
0