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

ConsoleBaseTest::testInitialiaseConsoleBase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

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