Completed
Branch master (c3d959)
by Alexandre
09:54
created

QueueShowCommandTest::testExecute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 9

Duplication

Lines 14
Ratio 100 %
Metric Value
dl 14
loc 14
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
use Symfony\Component\Console\Tester\CommandTester;
4
use Symfony\Bundle\FrameworkBundle\Console\Application;
5
use Heri\Bundle\JobQueueBundle\Tests\TestCase;
6
use Heri\Bundle\JobQueueBundle\Command\QueueShowCommand;
7
8 View Code Duplication
class QueueShowCommandTest extends TestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    public function testExecute()
11
    {
12
        $application = new Application($this->kernel);
13
        $application->add(new QueueShowCommand());
14
15
        $command = $application->find('jobqueue:show');
16
        $commandTester = new CommandTester($command);
17
        $commandTester->execute(array(
18
            'command' => $command->getName(),
19
            'queue-name' => 'toto',
20
        ));
21
22
        $this->assertRegExp('/| id | body | created | ended | failed |/', $commandTester->getDisplay());
23
    }
24
}
25