ApplicationTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 17
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testCheckCommandExists() 0 4 1
A setUp() 0 3 1
1
<?php
2
3
namespace ComposerRequireCheckerTest\Cli;
4
5
use ComposerRequireChecker\Cli\Application;
6
use PHPUnit\Framework\TestCase;
7
use Symfony\Component\Console\Command\Command;
8
9
final class ApplicationTest extends TestCase
10
{
11
12
    /**
13
     * @var Application
14
     */
15
    private $application;
16
17
    protected function setUp(): void
18
    {
19
        $this->application = new Application();
20
    }
21
22
    public function testCheckCommandExists(): void
23
    {
24
        $this->assertTrue($this->application->has('check'));
25
        $this->assertInstanceOf(Command::class, $this->application->get('check'));
26
    }
27
}
28