tests/integration/SqsIntegrationTest.php 1 location
|
@@ 65-77 (lines=13) @@
|
62 |
|
* |
63 |
|
* @return int |
64 |
|
*/ |
65 |
|
protected function stubQueueVisibilityTimeout($url) |
66 |
|
{ |
67 |
|
$timeout = 120; |
68 |
|
$model = m::mock(ResultInterface::class); |
69 |
|
$model->shouldReceive('get')->once()->with('Attributes')->andReturn(['VisibilityTimeout' => $timeout]); |
70 |
|
|
71 |
|
$this->sqsClient->shouldReceive('getQueueAttributes')->once()->with([ |
72 |
|
'QueueUrl' => $url, |
73 |
|
'AttributeNames' => ['VisibilityTimeout'], |
74 |
|
])->andReturn($model); |
75 |
|
|
76 |
|
return $timeout; |
77 |
|
} |
78 |
|
|
79 |
|
public function testReceive() |
80 |
|
{ |
tests/unit/Adapter/SqsAdapterTest.php 1 location
|
@@ 96-108 (lines=13) @@
|
93 |
|
* |
94 |
|
* @return int |
95 |
|
*/ |
96 |
|
protected function stubQueueVisibilityTimeout($url) |
97 |
|
{ |
98 |
|
$timeout = 120; |
99 |
|
$model = m::mock(ResultInterface::class); |
100 |
|
$model->shouldReceive('get')->once()->with('Attributes')->andReturn(['VisibilityTimeout' => $timeout]); |
101 |
|
|
102 |
|
$this->client->shouldReceive('getQueueAttributes')->once()->with([ |
103 |
|
'QueueUrl' => $url, |
104 |
|
'AttributeNames' => ['VisibilityTimeout'], |
105 |
|
])->andReturn($model); |
106 |
|
|
107 |
|
return $timeout; |
108 |
|
} |
109 |
|
|
110 |
|
public function testInterface() |
111 |
|
{ |