Passed
Pull Request — master (#156)
by Wilmer
06:05 queued 03:57
created

QueueDecoratorTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 9
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testWithAdapter() 0 14 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Debug\Tests\Collector;
6
7
use PHPUnit\Framework\TestCase;
8
use Yiisoft\Yii\Debug\Collector\QueueCollector;
9
use Yiisoft\Yii\Debug\Collector\QueueDecorator;
10
use Yiisoft\Yii\Queue\Adapter\AdapterInterface;
11
use Yiisoft\Yii\Queue\QueueInterface;
12
13
class QueueDecoratorTest extends TestCase
14
{
15
    public function testWithAdapter()
16
    {
17
        $queue = $this->createMock(QueueInterface::class);
18
        $collector = new QueueCollector();
19
        $decorator = new QueueDecorator(
20
            $queue,
21
            $collector,
22
        );
23
24
        $queueAdapter = $this->createMock(AdapterInterface::class);
25
26
        $newDecorator = $decorator->withAdapter($queueAdapter);
27
28
        $this->assertInstanceOf(QueueDecorator::class, $newDecorator);
29
    }
30
}
31