Passed
Push — master ( 4c7a43...519d04 )
by Mike
01:49
created

FacadeTest::testRunCommand()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
c 0
b 0
f 0
rs 9.9332
cc 1
nc 1
nop 0
1
<?php
2
namespace NexusTest\Shell;
3
4
use Xervice\Core\Locator\Locator;
5
6
class FacadeTest extends \Codeception\Test\Unit
7
{
8
    /**
9
     * @var \Nexus\Shell\ShellFacade
10
     */
11
    private $facade;
12
13
    protected function _before()
14
    {
15
        $this->facade = Locator::getInstance()->shell()->facade();
0 ignored issues
show
Documentation Bug introduced by
It seems like Xervice\Core\Locator\Loc...ce()->shell()->facade() of type Xervice\Core\Facade\EmptyFacade is incompatible with the declared type Nexus\Shell\ShellFacade of property $facade.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
16
    }
17
18
    /**
19
     * @group Nexus
20
     * @group Shell
21
     * @group Facade
22
     * @group Integration
23
     */
24
    public function testRunCommand()
25
    {
26
        $command = sprintf(
27
            'cat %s/testDir/findme',
28
            __DIR__
29
        );
30
31
        $this->assertEquals(
32
            'test',
33
            $this->facade->runCommand($command)
34
        );
35
    }
36
}