Code Duplication    Length = 104-110 lines in 2 locations

Tests/Transport/Rpc/RpcQueueBagTest.php 1 location

@@ 8-117 (lines=110) @@
5
use Cmobi\RabbitmqBundle\Transport\Rpc\RpcQueueBag;
6
use Cmobi\RabbitmqBundle\Tests\BaseTestCase;
7
8
class RpcQueueBagTest extends BaseTestCase
9
{
10
    public function testGetBasicQos()
11
    {
12
        $queueBag = new RpcQueueBag('test');
13
14
        $this->assertEquals(1, $queueBag->getBasicQos());
15
    }
16
17
    public function testGetQueueName()
18
    {
19
        $queueBag = new RpcQueueBag('test');
20
21
        $this->assertEquals('test', $queueBag->getQueue());
22
    }
23
24
    public function testGetPassive()
25
    {
26
        $queueBag = new RpcQueueBag('test');
27
28
        $this->assertEquals(false, $queueBag->getPassive());
29
    }
30
31
    public function testGetDurable()
32
    {
33
        $queueBag = new RpcQueueBag('test');
34
35
        $this->assertEquals(false, $queueBag->getDurable());
36
    }
37
38
    public function testGetExclusive()
39
    {
40
        $queueBag = new RpcQueueBag('test');
41
42
        $this->assertEquals(false, $queueBag->getExclusive());
43
    }
44
45
    public function testGetAutoDelete()
46
    {
47
        $queueBag = new RpcQueueBag('test');
48
49
        $this->assertEquals(true, $queueBag->getAutoDelete());
50
    }
51
52
    public function testGetNoWait()
53
    {
54
        $queueBag = new RpcQueueBag('test');
55
56
        $this->assertEquals(false, $queueBag->getNoWait());
57
    }
58
59
    public function testGetArguments()
60
    {
61
        $queueBag = new RpcQueueBag('test');
62
63
        $this->assertEquals(null, $queueBag->getArguments());
64
    }
65
66
    public function testGetTicket()
67
    {
68
        $queueBag = new RpcQueueBag('test');
69
70
        $this->assertEquals(null, $queueBag->getTicket());
71
    }
72
73
    public function testGetQueueDeclare()
74
    {
75
        $queueBag = new RpcQueueBag('test');
76
77
        $this->assertEquals(
78
            [
79
                'test',
80
                false,
81
                false,
82
                false,
83
                true,
84
                false,
85
                null,
86
                null,
87
            ],
88
            $queueBag->getQueueDeclare()
89
        );
90
    }
91
92
    public function testGetQueueConsume()
93
    {
94
        $queueBag = new RpcQueueBag('test');
95
96
        $this->assertEquals(
97
            [
98
                'test',
99
                '',
100
                false,
101
                false,
102
                false,
103
                false,
104
                null,
105
                null,
106
            ],
107
            $queueBag->getQueueConsume()
108
        );
109
    }
110
111
    public function testGetExchangeDeclare()
112
    {
113
        $queueBag = new RpcQueueBag('test');
114
115
        $this->assertEquals(false, $queueBag->getExchangeDeclare());
116
    }
117
}
118

Tests/Transport/Worker/WorkerQueueBagTest.php 1 location

@@ 8-111 (lines=104) @@
5
use Cmobi\RabbitmqBundle\Tests\BaseTestCase;
6
use Cmobi\RabbitmqBundle\Transport\Worker\WorkerQueueBag;
7
8
class WorkerQueueBagTest extends BaseTestCase
9
{
10
    public function testGetBasicQos()
11
    {
12
        $queueBag = new WorkerQueueBag('test');
13
14
        $this->assertEquals(1, $queueBag->getBasicQos());
15
    }
16
17
    public function testGetQueueName()
18
    {
19
        $queueBag = new WorkerQueueBag('test');
20
21
        $this->assertEquals('test', $queueBag->getQueue());
22
    }
23
24
    public function testGetPassive()
25
    {
26
        $queueBag = new WorkerQueueBag('test');
27
28
        $this->assertEquals(false, $queueBag->getPassive());
29
    }
30
    public function testGetDurable()
31
    {
32
        $queueBag = new WorkerQueueBag('test');
33
34
        $this->assertEquals(true, $queueBag->getDurable());
35
    }
36
    public function testGetExclusive()
37
    {
38
        $queueBag = new WorkerQueueBag('test');
39
40
        $this->assertEquals(false, $queueBag->getExclusive());
41
    }
42
    public function testGetAutoDelete()
43
    {
44
        $queueBag = new WorkerQueueBag('test');
45
46
        $this->assertEquals(false, $queueBag->getAutoDelete());
47
    }
48
    public function testGetNoWait()
49
    {
50
        $queueBag = new WorkerQueueBag('test');
51
52
        $this->assertEquals(false, $queueBag->getNoWait());
53
    }
54
    public function testGetArguments()
55
    {
56
        $queueBag = new WorkerQueueBag('test');
57
58
        $this->assertEquals(null, $queueBag->getArguments());
59
    }
60
    public function testGetTicket()
61
    {
62
        $queueBag = new WorkerQueueBag('test');
63
64
        $this->assertEquals(null, $queueBag->getTicket());
65
    }
66
67
    public function testGetQueueDeclare()
68
    {
69
        $queueBag = new WorkerQueueBag('test');
70
71
        $this->assertEquals(
72
            [
73
                'test',
74
                false,
75
                true,
76
                false,
77
                false,
78
                false,
79
                null,
80
                null,
81
            ],
82
            $queueBag->getQueueDeclare()
83
        );
84
    }
85
86
    public function testGetQueueConsume()
87
    {
88
        $queueBag = new WorkerQueueBag('test');
89
90
        $this->assertEquals(
91
            [
92
                'test',
93
                '',
94
                false,
95
                false,
96
                false,
97
                false,
98
                null,
99
                null,
100
            ],
101
            $queueBag->getQueueConsume()
102
        );
103
    }
104
105
    public function testGetExchangeDeclare()
106
    {
107
        $queueBag = new WorkerQueueBag('test');
108
109
        $this->assertEquals(false, $queueBag->getExchangeDeclare());
110
    }
111
}
112