Completed
Pull Request — master (#1)
by Timothy
05:16
created

ApplicationTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 1
cbo 2
dl 0
loc 33
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 6 1
A testHierarchy() 0 4 1
A testFactoryInstance() 0 6 1
A testFactoryInstanceHasRandomComplimentCommand() 0 8 1
1
<?php
2
3
namespace AbacaphiliacTest\Compliments;
4
5
use Abacaphiliac\Compliments\Application;
6
7
class ApplicationTest extends \PHPUnit_Framework_TestCase
8
{
9
    /** @var Application */
10
    private $sut;
11
12
    protected function setUp()
13
    {
14
        parent::setUp();
15
16
        $this->sut = new Application();
17
    }
18
    
19
    public function testHierarchy()
20
    {
21
        self::assertInstanceOf('\Symfony\Component\Console\Application', $this->sut);
22
    }
23
    
24
    public function testFactoryInstance()
25
    {
26
        $actual = Application::factory();
27
        
28
        self::assertInstanceOf('\Abacaphiliac\Compliments\Application', $actual);
29
    }
30
    
31
    public function testFactoryInstanceHasRandomComplimentCommand()
32
    {
33
        $application = Application::factory();
34
        
35
        $actual = $application->get('random:compliment');
36
        
37
        self::assertInstanceOf('\Abacaphiliac\Compliments\RandomComplimentCommand', $actual);
38
    }
39
}
40