CreateImageEntityCommandTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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