Passed
Pull Request — master (#209)
by Dmitriy
02:57
created

DummyCollectorTest::collectTestData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Debug\Tests\Unit\Collector;
6
7
use stdClass;
8
use Yiisoft\Yii\Debug\Collector\CollectorInterface;
9
use Yiisoft\Yii\Debug\Tests\Shared\AbstractCollectorTestCase;
10
11
final class DummyCollectorTest extends AbstractCollectorTestCase
12
{
13
    protected function getCollector(): CollectorInterface
14
    {
15
        $collector = $this->createMock(CollectorInterface::class);
16
        $collector->method('getCollected')
17
            ->willReturn(
18
                [
19
                    'int' => 123,
20
                    'str' => 'asdas',
21
                    'object' => new stdClass(),
22
                ]
23
            );
24
        $collector->method('getName')
25
            ->willReturn($collector::class);
26
27
        return $collector;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $collector returns the type PHPUnit\Framework\MockObject\MockObject which is incompatible with the type-hinted return Yiisoft\Yii\Debug\Collector\CollectorInterface.
Loading history...
28
    }
29
30
    protected function collectTestData(CollectorInterface $collector): void
31
    {
32
        // pass
33
    }
34
}
35