Issues (1)

tests/Commands/CommandTest.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace GuillermoandraeTest\Commands;
4
5
use Guillermoandrae\Commands\AbstractCommand;
6
use GuillermoandraeTest\Mock\MockCommand;
7
8
class CommandTest extends TestCase
9
{
10
    public function testConfigure()
11
    {
12
        $commandTester = $this->getCommandTester('mock');
13
        $output = $commandTester->getDisplay();
14
        $this->assertContains('stuff broke', $output);
15
    }
16
17
    public function testConfigureWithInvalidName()
18
    {
19
        $command = $this->getMockForAbstractClass(AbstractCommand::class, [], 'FakeThing');
20
        $this->assertNull($command->getName());
0 ignored issues
show
The method getName() does not exist on PHPUnit\Framework\MockObject\MockObject. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
        $this->assertNull($command->/** @scrutinizer ignore-call */ getName());

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
21
    }
22
23
    protected function setUp()
24
    {
25
        parent::setUp();
26
        $this->application->add(new MockCommand());
27
    }
28
}
29