irishdan /
ResponsiveImageBundle
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 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
|
|||
| 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 | } |
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.