QueueTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 9
Bugs 0 Features 0
Metric Value
eloc 8
c 9
b 0
f 0
dl 0
loc 18
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetClient() 0 6 1
A testGetName() 0 6 1
1
<?php
2
3
/**
4
 * This file is part of the tarantool/queue package.
5
 *
6
 * (c) Eugene Leonovich <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Tarantool\Queue\Tests\Unit;
15
16
use PHPUnit\Framework\TestCase;
17
use Tarantool\PhpUnit\Client\TestDoubleClient;
18
use Tarantool\Queue\Queue;
19
20
final class QueueTest extends TestCase
21
{
22
    use TestDoubleClient;
23
24
    public function testGetName() : void
25
    {
26
        $queueName = 'foobar';
27
        $queue = new Queue($this->createDummyClient(), $queueName);
28
29
        self::assertSame($queueName, $queue->getName());
30
    }
31
32
    public function testGetClient() : void
33
    {
34
        $client = $this->createDummyClient();
35
        $queue = new Queue($client, 'foobar');
36
37
        self::assertSame($client, $queue->getClient());
38
    }
39
}
40