CreateImageEntityCommandTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 33
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 12 1
A testCommandRunsSuccessfully() 0 15 1
1
<?php
2
3
namespace IrishDan\ResponsiveImageBundle\Test\Command;
4
5
use IrishDan\ResponsiveImageBundle\Tests\ResponsiveImageTestCase;
6
use Symfony\Bundle\FrameworkBundle\Console\Application;
7
use Symfony\Component\Console\Input\ArrayInput;
8
use Symfony\Component\Console\Output\NullOutput;
9
10
class CreateImageEntityCommandTest extends ResponsiveImageTestCase
11
{
12
    private $application;
13
14
    protected function setUp()
15
    {
16
        $this->markTestSkipped(
17
            'Not yet implemented properly'
18
        );
19
20
        // $this->bootSymfony();
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
21
        // $this->application = new Application($this->testKernel);
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
22
        // $this->application->setAutoExit(false);
0 ignored issues
show
Unused Code Comprehensibility introduced by
70% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
23
24
        // @TODO: Test these commands properly
25
    }
26
27
    public function testCommandRunsSuccessfully()
28
    {
29
        $output = new NullOutput();
30
        $input  = new ArrayInput(
31
            [
32
                'name'          => 'responsive_image:generate:entity',
33
                '--bundle'      => 'ResponsiveImageBundle',
34
                '--entity_name' => 'Img',
35
            ]
36
        );
37
        $input->setInteractive(false);
38
        $exitCode = $this->application->run($input, $output);
39
40
        $this->assertSame(1, $exitCode);
41
    }
42
}