File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,21 @@ protected function prepareAMQPConnection()
2323 ->getMock ();
2424 }
2525
26- protected function prepareAMQPChannel ()
26+ protected function prepareAMQPChannel ($ channelId = null )
2727 {
28- return $ this ->getMockBuilder ('\PhpAmqpLib\Channel\AMQPChannel ' )
28+ $ channelMock = $ this ->getMockBuilder ('\PhpAmqpLib\Channel\AMQPChannel ' )
2929 ->disableOriginalConstructor ()
3030 ->getMock ();
31+
32+ $ channelMock ->expects ($ this ->any ())
33+ ->method ('getChannelId ' )
34+ ->willReturn ($ channelId );
35+ return $ channelMock ;
3136 }
3237
3338 public function testQueueBind ()
3439 {
35- $ ch = $ this ->prepareAMQPChannel ();
40+ $ ch = $ this ->prepareAMQPChannel (' channel_id ' );
3641 $ con = $ this ->prepareAMQPConnection ();
3742
3843 $ source = 'example_source ' ;
@@ -57,7 +62,7 @@ public function testQueueBind()
5762
5863 public function testExhangeBind ()
5964 {
60- $ ch = $ this ->prepareAMQPChannel ();
65+ $ ch = $ this ->prepareAMQPChannel (' channel_id ' );
6166 $ con = $ this ->prepareAMQPConnection ();
6267
6368 $ source = 'example_source ' ;
You can’t perform that action at this time.
0 commit comments