tests/integration/SqsIntegrationTest.php 1 location
|
@@ 46-58 (lines=13) @@
|
| 43 |
|
* |
| 44 |
|
* @return string |
| 45 |
|
*/ |
| 46 |
|
protected function stubCreateQueue() |
| 47 |
|
{ |
| 48 |
|
$url = 'queue://foo'; |
| 49 |
|
$model = m::mock(ResultInterface::class); |
| 50 |
|
$model->shouldReceive('get')->once()->with('QueueUrl')->andReturn($url); |
| 51 |
|
|
| 52 |
|
$this->sqsClient->shouldReceive('createQueue')->once()->with([ |
| 53 |
|
'QueueName' => $this->queueName, |
| 54 |
|
'Attributes' => [], |
| 55 |
|
])->andReturn($model); |
| 56 |
|
|
| 57 |
|
return $url; |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
/** |
| 61 |
|
* @param string $url |
tests/unit/Adapter/SqsAdapterTest.php 1 location
|
@@ 80-92 (lines=13) @@
|
| 77 |
|
* |
| 78 |
|
* @return string |
| 79 |
|
*/ |
| 80 |
|
protected function stubCreateQueue($name, array $options = []) |
| 81 |
|
{ |
| 82 |
|
$url = 'foo://bar'; |
| 83 |
|
$model = m::mock(ResultInterface::class); |
| 84 |
|
$model->shouldReceive('get')->once()->with('QueueUrl')->andReturn($url); |
| 85 |
|
|
| 86 |
|
$this->client->shouldReceive('createQueue')->once()->with([ |
| 87 |
|
'QueueName' => $name, |
| 88 |
|
'Attributes' => $options, |
| 89 |
|
])->andReturn($model); |
| 90 |
|
|
| 91 |
|
return $url; |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
/** |
| 95 |
|
* @param string $url |