Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 77-89 (lines=13) @@
74
     *
75
     * @return string
76
     */
77
    protected function stubCreateQueue($name, array $options = [])
78
    {
79
        $url = 'foo://bar';
80
        $model = m::mock(ResultInterface::class);
81
        $model->shouldReceive('get')->once()->with('QueueUrl')->andReturn($url);
82
83
        $this->client->shouldReceive('createQueue')->once()->with([
84
            'QueueName'  => $name,
85
            'Attributes' => $options,
86
        ])->andReturn($model);
87
88
        return $url;
89
    }
90
91
    /**
92
     * @param string $url