Skip to content

Commit c0ce9b6

Browse files
committed
Fix mocks and logger
1 parent 32d49e3 commit c0ce9b6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/DoctrinePingConnectionExtensionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,6 @@ public function testShouldSkipIfConnectionWasNotOpened()
135135
;
136136

137137
$context = $this->createContext();
138-
$context->getLogger()
139-
->expects($this->never())
140-
->method('debug')
141-
;
142138

143139
$registry = $this->createRegistryMock();
144140
$registry
@@ -149,6 +145,10 @@ public function testShouldSkipIfConnectionWasNotOpened()
149145

150146
$extension = new DoctrinePingConnectionExtension($registry);
151147
$extension->onMessageReceived($context);
148+
149+
/** @var TestLogger $logger */
150+
$logger = $context->getLogger();
151+
$this->assertFalse($logger->hasDebugRecords());
152152
}
153153

154154
protected function createContext(): MessageReceived

pkg/enqueue/Tests/Client/ProducerSendCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ public function testShouldCallPostSendExtensionMethod()
479479

480480
$extension
481481
->expects(self::once())
482-
->method('onDriverPreSend')
482+
->method('onPostSend')
483483
->willReturnCallback(function (PostSend $context) use ($message, $producer, $driver) {
484484
$this->assertSame($message, $context->getMessage());
485485
$this->assertSame($producer, $context->getProducer());

pkg/enqueue/Tests/Client/ProducerSendEventTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ public function testShouldCallPostSendExtensionMethodWhenSendToApplicationRouter
499499

500500
$extension
501501
->expects(self::once())
502-
->method('onDriverPreSend')
502+
->method('onPostSend')
503503
->willReturnCallback(function (PostSend $context) use ($message, $producer, $driver) {
504504
$this->assertSame($message, $context->getMessage());
505505
$this->assertSame($producer, $context->getProducer());

0 commit comments

Comments
 (0)