Tests/Transport/PubSub/SubscriberBuilderTest.php 1 location
|
@@ 73-90 (lines=18) @@
|
| 70 |
|
/** |
| 71 |
|
* @return CmobiAMQPConnectionInterface |
| 72 |
|
*/ |
| 73 |
|
protected function getAMQPStreamConnectionMock() |
| 74 |
|
{ |
| 75 |
|
$class = $this->getMockBuilder(CmobiAMQPConnection::class) |
| 76 |
|
->disableOriginalConstructor() |
| 77 |
|
->getMock(); |
| 78 |
|
|
| 79 |
|
$channelMock = $this->getMockBuilder(CmobiAMQPChannel::class) |
| 80 |
|
->disableOriginalConstructor() |
| 81 |
|
->getMock(); |
| 82 |
|
$channelMock->expects($this->any()) |
| 83 |
|
->method('basic_qos') |
| 84 |
|
->willReturn(true); |
| 85 |
|
|
| 86 |
|
$class->method('channel') |
| 87 |
|
->willReturn($channelMock); |
| 88 |
|
|
| 89 |
|
return $class; |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
/** |
| 93 |
|
* @return ConnectionManager |
Tests/Transport/Rpc/RpcServerBuilderTest.php 1 location
|
@@ 45-62 (lines=18) @@
|
| 42 |
|
/** |
| 43 |
|
* @return CmobiAMQPConnectionInterface |
| 44 |
|
*/ |
| 45 |
|
protected function getAMQPStreamConnectionMock() |
| 46 |
|
{ |
| 47 |
|
$class = $this->getMockBuilder(CmobiAMQPConnection::class) |
| 48 |
|
->disableOriginalConstructor() |
| 49 |
|
->getMock(); |
| 50 |
|
|
| 51 |
|
$channelMock = $this->getMockBuilder(CmobiAMQPChannel::class) |
| 52 |
|
->disableOriginalConstructor() |
| 53 |
|
->getMock(); |
| 54 |
|
$channelMock->expects($this->any()) |
| 55 |
|
->method('basic_qos') |
| 56 |
|
->willReturn(true); |
| 57 |
|
|
| 58 |
|
$class->method('channel') |
| 59 |
|
->willReturn($channelMock); |
| 60 |
|
|
| 61 |
|
return $class; |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
/** |
| 65 |
|
* @return ConnectionManager |
Tests/Transport/Worker/WorkerBuilderTest.php 1 location
|
@@ 35-52 (lines=18) @@
|
| 32 |
|
/** |
| 33 |
|
* @return CmobiAMQPConnectionInterface |
| 34 |
|
*/ |
| 35 |
|
protected function getAMQPStreamConnectionMock() |
| 36 |
|
{ |
| 37 |
|
$class = $this->getMockBuilder(CmobiAMQPConnection::class) |
| 38 |
|
->disableOriginalConstructor() |
| 39 |
|
->getMock(); |
| 40 |
|
|
| 41 |
|
$channelMock = $this->getMockBuilder(CmobiAMQPChannel::class) |
| 42 |
|
->disableOriginalConstructor() |
| 43 |
|
->getMock(); |
| 44 |
|
$channelMock->expects($this->any()) |
| 45 |
|
->method('basic_qos') |
| 46 |
|
->willReturn(true); |
| 47 |
|
|
| 48 |
|
$class->method('channel') |
| 49 |
|
->willReturn($channelMock); |
| 50 |
|
|
| 51 |
|
return $class; |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
/** |
| 55 |
|
* @return ConnectionManager |