Code Duplication    Length = 7-13 lines in 4 locations

Tests/Transport/PubSub/SubscriberBuilderTest.php 1 location

@@ 30-42 (lines=13) @@
27
        $this->assertInstanceOf(ConnectionManager::class, $connectionManager);
28
    }
29
30
    public function testBuildQueue()
31
    {
32
        $subscriberBuilder = new SubscriberBuilder(
33
            'test',
34
            ExchangeType::FANOUT,
35
            $this->getConnectionManagerMock(),
36
            $this->getLoggerMock(),
37
            []
38
        );
39
        $queue = $subscriberBuilder->buildQueue('test', $this->getQueueServiceMock());
40
41
        $this->assertInstanceOf(QueueInterface::class, $queue);
42
    }
43
44
    public function testGetExchange()
45
    {

Tests/Transport/Rpc/RpcServerBuilderTest.php 2 locations

@@ 25-31 (lines=7) @@
22
        $this->assertInstanceOf(ConnectionManager::class, $connectionManager);
23
    }
24
25
    public function testBuildQueue()
26
    {
27
        $rpcServer = new RpcServerBuilder($this->getConnectionManagerMock(), $this->getLoggerMock(), []);
28
        $queue = $rpcServer->buildQueue('test', $this->getQueueServiceMock());
29
30
        $this->assertInstanceOf(QueueInterface::class, $queue);
31
    }
32
33
    public function testGetCallbackAfterBuildQueue()
34
    {
@@ 33-40 (lines=8) @@
30
        $this->assertInstanceOf(QueueInterface::class, $queue);
31
    }
32
33
    public function testGetCallbackAfterBuildQueue()
34
    {
35
        $rpcServer = new RpcServerBuilder($this->getConnectionManagerMock(), $this->getLoggerMock(), []);
36
        $queue = $rpcServer->buildQueue('test', $this->getQueueServiceMock());
37
        $callback = $queue->getCallback();
38
39
        $this->assertInstanceOf(QueueCallbackInterface::class, $callback);
40
    }
41
42
    /**
43
     * @return CmobiAMQPConnectionInterface

Tests/Transport/Worker/WorkerBuilderTest.php 1 location

@@ 24-30 (lines=7) @@
21
        $this->assertInstanceOf(ConnectionManager::class, $connectionManager);
22
    }
23
24
    public function testBuildQueue()
25
    {
26
        $workerServer = new WorkerBuilder($this->getConnectionManagerMock(), $this->getLoggerMock(), []);
27
        $queue = $workerServer->buildQueue('test', $this->getQueueServiceMock());
28
29
        $this->assertInstanceOf(QueueInterface::class, $queue);
30
    }
31
32
    /**
33
     * @return CmobiAMQPConnectionInterface