Completed
Push — develop ( bbf1d7...d89cb9 )
by Tom
05:51
created

MakeCommandCommandTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testOutput() 0 21 1
1
<?php
2
3
namespace N98\Magento\Command\Developer\Console;
4
5
use N98\Magento\Command\Developer\Console\Util\Config\DiFileWriter;
6
7
class MakeCommandCommandTest extends TestCase
8
{
9
    /**
10
     * @test
11
     */
12
    public function testOutput()
13
    {
14
        $diFileWriterMock = $this->getMockBuilder(DiFileWriter::class)
15
            ->setMethods(['save'])
16
            ->getMock();
17
        $diFileWriterMock->loadXml('<config />');
18
19
        $command = $this->getMock(MakeCommandCommand::class, ['createDiFileWriter']);
20
        $command
21
            ->expects($this->once())
22
            ->method('createDiFileWriter')
23
            ->will($this->returnValue($diFileWriterMock));
24
25
        $commandTester = $this->createCommandTester($command);
26
        $command->setCurrentModuleName('N98_Dummy');
27
28
        $writerMock = $this->mockWriterFileCWriteFileAssertion('bazCommand');
29
30
        $command->setCurrentModuleDirectoryWriter($writerMock);
31
        $commandTester->execute(['classpath' => 'foo.bar.baz']);
32
    }
33
}
34