Completed
Push — master ( b01469...216ca8 )
by Robbie
8s
created

ConsoleBaseTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testInitialiaseConsoleBase() 0 11 1
1
<?php
2
3
namespace SilverLeague\Console\Tests\Framework;
4
5
use SilverLeague\Console\Framework\ConsoleBase;
6
use SilverLeague\Console\Framework\Scaffold;
7
8
/**
9
 * @coversDefaultClass \SilverLeague\Console\Framework\ConsoleBase
10
 * @package silverleague-console
11
 * @author  Robbie Averill <[email protected]>
12
 */
13
class ConsoleBaseTest extends \PHPUnit_Framework_TestCase
14
{
15
    /**
16
     * Test that the application can be injected, set and retrieved
17
     */
18
    public function testInitialiaseConsoleBase()
19
    {
20
        $application = (new Scaffold)->getApplication();
21
22
        $consoleBase = new ConsoleBase($application);
23
24
        $this->assertSame($application, $consoleBase->getApplication());
25
        $newApplication = clone $application;
26
        $consoleBase->setApplication($newApplication);
27
        $this->assertNotSame($application, $consoleBase->getApplication());
28
    }
29
}
30