File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ public function __construct(
3737 $ this ->consumer = $ consumer ;
3838 $ this ->message = $ message ;
3939 $ this ->queue = $ consumer ->getQueue ()->getQueueName ();
40+ $ this ->connectionName = $ connection ->getConnectionName ();
4041 }
4142
4243 /**
Original file line number Diff line number Diff line change @@ -52,14 +52,22 @@ public function testCouldBeConstructedWithExpectedArguments()
5252 ->willReturn ($ queue )
5353 ;
5454
55+ $ connectionMock = $ this ->createRabbitMQQueueMock ();
56+ $ connectionMock
57+ ->expects ($ this ->any ())
58+ ->method ('getConnectionName ' )
59+ ->willReturn ('theConnectionName ' )
60+ ;
61+
5562 $ job = new RabbitMQJob (
5663 new Container (),
57- $ this -> createRabbitMQQueueMock () ,
64+ $ connectionMock ,
5865 $ consumerMock ,
5966 new AmqpMessage ()
6067 );
6168
6269 $ this ->assertAttributeSame ('theQueueName ' , 'queue ' , $ job );
70+ $ this ->assertSame ('theConnectionName ' , $ job ->getConnectionName ());
6371 }
6472
6573 /**
You can’t perform that action at this time.
0 commit comments