HelpCommandTest::testExecute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Bowerphp\Test\Command;
4
5
use Bowerphp\Console\Application;
6
use PHPUnit\Framework\TestCase;
7
use Symfony\Component\Console\Tester\CommandTester;
8
9
/**
10
 * @group functional
11
 */
12
class HelpCommandTest extends TestCase
13
{
14
    public function testExecute()
15
    {
16
        $application = new Application();
17
        $commandTester = new CommandTester($command = $application->get('help'));
18
        $commandTester->execute(['command' => $command->getName()], ['decorated' => false]);
19
20
        $this->assertRegExp('/displays help for a given command/', $commandTester->getDisplay());
21
    }
22
}
23