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()
23
23
->getMock ();
24
24
}
25
25
26
- protected function prepareAMQPChannel ()
26
+ protected function prepareAMQPChannel ($ channelId = null )
27
27
{
28
- return $ this ->getMockBuilder ('\PhpAmqpLib\Channel\AMQPChannel ' )
28
+ $ channelMock = $ this ->getMockBuilder ('\PhpAmqpLib\Channel\AMQPChannel ' )
29
29
->disableOriginalConstructor ()
30
30
->getMock ();
31
+
32
+ $ channelMock ->expects ($ this ->any ())
33
+ ->method ('getChannelId ' )
34
+ ->willReturn ($ channelId );
35
+ return $ channelMock ;
31
36
}
32
37
33
38
public function testQueueBind ()
34
39
{
35
- $ ch = $ this ->prepareAMQPChannel ();
40
+ $ ch = $ this ->prepareAMQPChannel (' channel_id ' );
36
41
$ con = $ this ->prepareAMQPConnection ();
37
42
38
43
$ source = 'example_source ' ;
@@ -57,7 +62,7 @@ public function testQueueBind()
57
62
58
63
public function testExhangeBind ()
59
64
{
60
- $ ch = $ this ->prepareAMQPChannel ();
65
+ $ ch = $ this ->prepareAMQPChannel (' channel_id ' );
61
66
$ con = $ this ->prepareAMQPConnection ();
62
67
63
68
$ source = 'example_source ' ;
You can’t perform that action at this time.
0 commit comments