Code Duplication    Length = 20-20 lines in 2 locations

test/LatestCommandTest.php 1 location

@@ 9-28 (lines=20) @@
6
use Reddogs\Doctrine\Migrations\ModuleConfig;
7
use ZF\Console\Route;
8
9
class LatestCommandTest extends \PHPUnit_Framework_TestCase
10
{
11
    private $command, $route;
12
13
    protected function setUp()
14
    {
15
        $this->command = $this->getMockBuilder(LatestCommand::class)
16
                              ->disableOriginalConstructor()
17
                              ->setMethods(['null'])
18
                              ->getMock();
19
        $moduleConfig = (new ModuleConfig())->__invoke();
20
        $migrateParams = $moduleConfig['console_routes']['mogrations:latest'];
21
        $this->route = new Route($migrateParams['name'], $migrateParams['route']);
22
    }
23
24
    public function testGetInputCommand()
25
    {
26
        $this->assertSame('migrations:latest', $this->command->getInputCommand($this->route));
27
    }
28
}

test/StatusCommandTest.php 1 location

@@ 9-28 (lines=20) @@
6
use ZF\Console\Route;
7
use Reddogs\Doctrine\Migrations\StatusCommand;
8
9
class StatusCommandTest extends \PHPUnit_Framework_TestCase
10
{
11
    private $command, $route;
12
13
    protected function setUp()
14
    {
15
        $this->command = $this->getMockBuilder(StatusCommand::class)
16
                              ->disableOriginalConstructor()
17
                              ->setMethods(['null'])
18
                              ->getMock();
19
        $moduleConfig = (new ModuleConfig())->__invoke();
20
        $migrateParams = $moduleConfig['console_routes']['mogrations:status'];
21
        $this->route = new Route($migrateParams['name'], $migrateParams['route']);
22
    }
23
24
    public function testGetInputCommand()
25
    {
26
        $this->assertSame('migrations:status', $this->command->getInputCommand($this->route));
27
    }
28
}