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
|
@@ 99-111 (lines=13) @@
|
| 96 |
|
* |
| 97 |
|
* @return int |
| 98 |
|
*/ |
| 99 |
|
protected function stubQueueVisibilityTimeout($url) |
| 100 |
|
{ |
| 101 |
|
$timeout = 120; |
| 102 |
|
$model = m::mock(ResultInterface::class); |
| 103 |
|
$model->shouldReceive('get')->once()->with('Attributes')->andReturn(['VisibilityTimeout' => $timeout]); |
| 104 |
|
|
| 105 |
|
$this->client->shouldReceive('getQueueAttributes')->once()->with([ |
| 106 |
|
'QueueUrl' => $url, |
| 107 |
|
'AttributeNames' => ['VisibilityTimeout'], |
| 108 |
|
])->andReturn($model); |
| 109 |
|
|
| 110 |
|
return $timeout; |
| 111 |
|
} |
| 112 |
|
|
| 113 |
|
public function testInterface() |
| 114 |
|
{ |