QueueAwareTraitTest::getQueue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
namespace TraderInteractiveTest\Mongo;
3
4
use PHPUnit\Framework\TestCase;
5
6
class QueueAwareTraitTest extends TestCase
7
{
8
    /**
9
     * Verify basic behavior of setQueue().
10
     *
11
     * @test
12
     * @covers \TraderInteractive\Mongo\QueueAwareTrait
13
     *
14
     * @return void
15
     */
16
    public function setQueue()
17
    {
18
        $mockQueue = $this->getObjectForTrait('\TraderInteractive\Mongo\QueueAwareTrait');
19
        $mongoQueue = $this->getMockBuilder('\\TraderInteractive\\Mongo\\QueueInterface')->getMock();
20
        $mockQueue->setQueue($mongoQueue);
21
        $this->assertEquals($mongoQueue, $mockQueue->getQueue());
22
    }
23
24
    /**
25
     * Verify basic behavior of getQueue().
26
     *
27
     * @test
28
     * @covers \TraderInteractive\Mongo\QueueAwareTrait
29
     *
30
     * @return void
31
     */
32
    public function getQueue()
33
    {
34
        $mockQueue = $this->getObjectForTrait('\TraderInteractive\Mongo\QueueAwareTrait');
35
        $mongoQueue = $this->getMockBuilder('\\TraderInteractive\\Mongo\\QueueInterface')->getMock();
36
        $mockQueue->setQueue($mongoQueue);
37
        $this->assertEquals($mongoQueue, $mockQueue->getQueue());
38
    }
39
}
40