Skip to content

Commit 89d252e

Browse files
committed
fix tests
1 parent 7ae57ba commit 89d252e

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

pkg/enqueue/Consumption/Extension/LogExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function onMessageReceived(MessageReceived $context): void
3030
{
3131
$message = $context->getMessage();
3232

33-
$context->getLogger()->debug("Received from {queueName}", [
33+
$context->getLogger()->debug('Received from {queueName}', [
3434
'queueName' => $context->getConsumer()->getQueue()->getQueueName(),
3535
'redelivered' => $message->isRedelivered(),
3636
'body' => Stringify::that($message->getBody()),
@@ -45,7 +45,7 @@ public function onPostMessageReceived(PostMessageReceived $context): void
4545
$queue = $context->getConsumer()->getQueue();
4646
$result = $context->getResult();
4747

48-
$logMessage = "Processed from {queueName}";
48+
$logMessage = 'Processed from {queueName}';
4949

5050
$reason = '';
5151
if ($result instanceof Result && $result->getReason()) {

pkg/enqueue/Tests/Client/ConsumptionExtension/LogExtensionTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function testShouldLogMessageReceived()
9191
$logger
9292
->expects($this->once())
9393
->method('debug')
94-
->with('Received from {queueName} {body}', [
94+
->with('Received from {queueName}', [
9595
'queueName' => 'aQueue',
9696
'redelivered' => false,
9797
'body' => Stringify::that('aBody'),
@@ -118,7 +118,7 @@ public function testShouldLogMessageProcessedWithStringResult()
118118
->expects($this->once())
119119
->method('log')
120120
->with(LogLevel::INFO,
121-
'Processed from {queueName} {body} {result}',
121+
'Processed from {queueName}',
122122
[
123123
'queueName' => 'aQueue',
124124
'body' => Stringify::that('aBody'),
@@ -148,7 +148,7 @@ public function testShouldLogRejectedMessageAsError()
148148
->expects($this->once())
149149
->method('log')
150150
->with(LogLevel::ERROR,
151-
'Processed from {queueName} {body} {result}',
151+
'Processed from {queueName}',
152152
[
153153
'queueName' => 'aQueue',
154154
'body' => Stringify::that('aBody'),
@@ -178,7 +178,7 @@ public function testShouldLogMessageProcessedWithResultObject()
178178
->expects($this->once())
179179
->method('log')
180180
->with(LogLevel::INFO,
181-
'Processed from {queueName} {body} {result}',
181+
'Processed from {queueName}',
182182
[
183183
'queueName' => 'aQueue',
184184
'body' => Stringify::that('aBody'),
@@ -208,7 +208,7 @@ public function testShouldLogMessageProcessedWithReasonResultObject()
208208
->expects($this->once())
209209
->method('log')
210210
->with(LogLevel::INFO,
211-
'Processed from {queueName} {body} {result} {reason}',
211+
'Processed from {queueName}',
212212
[
213213
'queueName' => 'aQueue',
214214
'body' => Stringify::that('aBody'),

pkg/enqueue/Tests/Consumption/Extension/LogExtensionTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function testShouldLogMessageReceived()
8585
$logger
8686
->expects($this->once())
8787
->method('debug')
88-
->with('Received from {queueName} {body}', [
88+
->with('Received from {queueName}', [
8989
'queueName' => 'aQueue',
9090
'redelivered' => false,
9191
'body' => Stringify::that('aBody'),
@@ -112,7 +112,7 @@ public function testShouldLogMessageProcessedWithStringResult()
112112
->expects($this->once())
113113
->method('log')
114114
->with(LogLevel::INFO,
115-
'Processed from {queueName} {body} {result}',
115+
'Processed from {queueName}',
116116
[
117117
'queueName' => 'aQueue',
118118
'body' => Stringify::that('aBody'),
@@ -142,7 +142,7 @@ public function testShouldLogRejectedMessageAsError()
142142
->expects($this->once())
143143
->method('log')
144144
->with(LogLevel::ERROR,
145-
'Processed from {queueName} {body} {result}',
145+
'Processed from {queueName}',
146146
[
147147
'queueName' => 'aQueue',
148148
'body' => Stringify::that('aBody'),
@@ -172,7 +172,7 @@ public function testShouldLogMessageProcessedWithResultObject()
172172
->expects($this->once())
173173
->method('log')
174174
->with(LogLevel::INFO,
175-
'Processed from {queueName} {body} {result}',
175+
'Processed from {queueName}',
176176
[
177177
'queueName' => 'aQueue',
178178
'body' => Stringify::that('aBody'),
@@ -202,7 +202,7 @@ public function testShouldLogMessageProcessedWithReasonResultObject()
202202
->expects($this->once())
203203
->method('log')
204204
->with(LogLevel::INFO,
205-
'Processed from {queueName} {body} {result} {reason}',
205+
'Processed from {queueName}',
206206
[
207207
'queueName' => 'aQueue',
208208
'body' => Stringify::that('aBody'),

0 commit comments

Comments
 (0)