Skip to content

Commit 088c780

Browse files
author
Mikhail Bakulin
committed
Unit test is fixed according to new daemon restart functionality
1 parent 73c089f commit 088c780

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/components/ConsumerTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,17 @@ public function testForceRestart()
284284
$connection->method('channel')
285285
->willReturn($channel);
286286
$routing = $this->createMock(Routing::class);
287-
$routing->expects($this->never())
288-
->method('declareAll');
289287
$logger = $this->createMock(Logger::class);
290288
$consumer = $this->getMockBuilder(Consumer::class)
291289
->setConstructorArgs([$connection, $routing, $logger, false])
292290
->setMethods(['consume'])
293291
->getMock();
294292
$consumer->expects($this->once())
295-
->method('consume');
293+
->method('stopConsuming');
294+
$consumer->expects($this->once())
295+
->method('renew');
296+
$consumer->expects($this->once())
297+
->method('setup');
296298
$consumer->setQueues(['queue' => 'callback']);
297299
$this->setInaccessibleProperty($consumer, 'consumed', 11);
298300
$consumer->restartDaemon();

0 commit comments

Comments
 (0)