Passed
Pull Request — master (#64)
by Christian
02:02
created

ApplicationTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testCommand() 0 3 1
A setUp() 0 3 1
A testGetDefinitionClearsArguments() 0 3 1
1
<?php
2
3
namespace PHPCodeBrowser\Tests;
4
5
use PHPCodeBrowser\Application;
6
use PHPCodeBrowser\Command\RunCommand;
7
8
/**
9
 * Class ApplicationTest
10
 */
11
class ApplicationTest extends \PHPUnit\Framework\TestCase
12
{
13
    /**
14
     * @var Application
15
     */
16
    private $application;
17
18
    /**
19
     *
20
     */
21
    protected function setUp(): void
22
    {
23
        $this->application = new Application();
24
    }
25
26
    /**
27
     *
28
     */
29
    public function testCommand(): void
30
    {
31
        $this->assertInstanceOf(RunCommand::class, $this->application->get('phpcb'));
32
    }
33
34
    /**
35
     *
36
     */
37
    public function testGetDefinitionClearsArguments(): void
38
    {
39
        $this->assertEquals(0, $this->application->getDefinition()->getArgumentCount());
40
    }
41
}
42