Completed
Push — master ( 461024...58a10f )
by Timothy
05:24 queued 02:19
created

ApplicationTest::testHierarchy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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