Completed
Pull Request — master (#1)
by Daniel
15:18 queued 11:09
created

WorkerQueueCallbackTest::getQueueServiceMock()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 10
Ratio 100 %

Importance

Changes 0
Metric Value
dl 10
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace Cmobi\RabbitmqBundle\Test\Transport\Rpc;
4
5
use Cmobi\RabbitmqBundle\Queue\QueueServiceInterface;
6
use Cmobi\RabbitmqBundle\Tests\BaseTestCase;
7
use Cmobi\RabbitmqBundle\Transport\Worker\WorkerQueueCallback;
8
9 View Code Duplication
class WorkerQueueCallbackTest extends BaseTestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    public function testGetQueueService()
12
    {
13
        $rpcQueueCallback = new WorkerQueueCallback($this->getQueueServiceMock());
14
        $queueService = $rpcQueueCallback->getQueueService();
15
16
        $this->assertInstanceOf(QueueServiceInterface::class, $queueService);
17
    }
18
19
    /**
20
     * @return QueueServiceInterface
21
     */
22
    protected function getQueueServiceMock()
23
    {
24
        $queueServiceMock = $this->getMockBuilder(QueueServiceInterface::class)
25
            ->disableOriginalConstructor()
26
            ->getMock();
27
        $queueServiceMock->method('handle')
28
            ->willReturn('');
29
30
        return $queueServiceMock;
31
    }
32
}
33