Skip to content

Commit 3a33415

Browse files
committed
Fixed test
1 parent f58a8c8 commit 3a33415

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎pkg/enqueue/Tests/Client/ConsumptionExtension/SetRouterPropertiesExtensionTest.php‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public function testCouldBeConstructedWithRequiredArguments()
3030
public function testShouldSetRouterProcessorPropertyIfNotSetAndOnRouterQueue()
3131
{
3232
$config = Config::create('test', '', '', 'router-queue', '', 'router-processor-name');
33+
$queue = new NullQueue('test.router-queue');
3334

3435
$driver = $this->createDriverMock();
3536
$driver
@@ -38,6 +39,12 @@ public function testShouldSetRouterProcessorPropertyIfNotSetAndOnRouterQueue()
3839
->willReturn($config)
3940
;
4041

42+
$driver
43+
->expects($this->once())
44+
->method('createQueue')
45+
->willReturn($queue)
46+
;
47+
4148
$message = new NullMessage();
4249

4350
$context = new Context($this->createPsrContextMock());
@@ -56,6 +63,7 @@ public function testShouldSetRouterProcessorPropertyIfNotSetAndOnRouterQueue()
5663
public function testShouldNotSetRouterProcessorPropertyIfNotSetAndNotOnRouterQueue()
5764
{
5865
$config = Config::create('test', '', '', 'router-queue', '', 'router-processor-name');
66+
$queue = new NullQueue('test.router-queue');
5967

6068
$driver = $this->createDriverMock();
6169
$driver
@@ -64,6 +72,12 @@ public function testShouldNotSetRouterProcessorPropertyIfNotSetAndNotOnRouterQue
6472
->willReturn($config)
6573
;
6674

75+
$driver
76+
->expects($this->once())
77+
->method('createQueue')
78+
->willReturn($queue)
79+
;
80+
6781
$message = new NullMessage();
6882

6983
$context = new Context($this->createPsrContextMock());

0 commit comments

Comments
 (0)