Passed
Push — master ( baff11...71ae2f )
by Michael
04:40
created

testGetDefinitionClearsArguments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace PHPCodeBrowser\Tests;
4
5
use PHPCodeBrowser\Application;
6
use PHPCodeBrowser\Command\RunCommand;
7
use Symfony\Component\Console\Input\InputArgument;
8
9
/**
10
 * Class ApplicationTest
11
 */
12
class ApplicationTest extends \PHPUnit\Framework\TestCase
13
{
14
    /**
15
     * @var Application
16
     */
17
    private $application;
18
19
    /**
20
     *
21
     */
22
    protected function setUp(): void
23
    {
24
        $this->application = new Application();
25
    }
26
27
    /**
28
     *
29
     */
30
    public function testCommand(): void
31
    {
32
        $this->assertInstanceOf(RunCommand::class, $this->application->get('phpcb'));
33
    }
34
35
    /**
36
     *
37
     */
38
    public function testGetDefinitionClearsArguments(): void
39
    {
40
        $this->application->getDefinition()->setArguments([new InputArgument('foo')]);
41
42
        $this->assertEquals(0, $this->application->getDefinition()->getArgumentCount());
43
    }
44
}
45