BaseCommandTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 13
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 16
rs 9.8333
1
<?php
2
3
namespace OldSound\RabbitMqBundle\Tests\Command;
4
5
use PHPUnit\Framework\TestCase;
6
7
abstract class BaseCommandTest extends TestCase
8
{
9
    protected $application;
10
    protected $definition;
11
    protected $helperSet;
12
    protected $command;
13
14
    protected function setUp(): void
15
    {
16
        $this->application = $this->getMockBuilder('Symfony\\Component\\Console\\Application')
17
            ->disableOriginalConstructor()
18
            ->getMock();
19
        $this->definition = $this->getMockBuilder('Symfony\\Component\\Console\\Input\\InputDefinition')
20
            ->disableOriginalConstructor()
21
            ->getMock();
22
        $this->helperSet = $this->getMockBuilder('Symfony\\Component\\Console\\Helper\\HelperSet')->getMock();
23
24
        $this->application->expects($this->any())
25
            ->method('getDefinition')
26
            ->will($this->returnValue($this->definition));
27
        $this->definition->expects($this->any())
28
            ->method('getArguments')
29
            ->will($this->returnValue([]));
30
    }
31
}
32