| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 11 | public function testExecute() |
||
| 12 | { |
||
| 13 | $application = new Application($this->kernel); |
||
| 14 | $application->add(new QueueCreateCommand()); |
||
| 15 | |||
| 16 | $command = $application->find('jobqueue:create'); |
||
| 17 | $commandTester = new CommandTester($command); |
||
| 18 | $commandTester->execute(array( |
||
| 19 | 'command' => $command->getName(), |
||
| 20 | 'queue-name' => 'my:queue1', |
||
| 21 | '--timeout' => 10, |
||
| 22 | ), array('interactive' => false)); |
||
| 23 | |||
| 24 | $application->add(new QueueDeleteCommand()); |
||
| 25 | |||
| 26 | $command = $application->find('jobqueue:delete'); |
||
| 27 | $commandTester = new CommandTester($command); |
||
| 28 | $commandTester->execute(array( |
||
| 29 | 'command' => $command->getName(), |
||
| 30 | 'queue-name' => 'my:queue1', |
||
| 31 | ), array('interactive' => false)); |
||
| 32 | |||
| 33 | $this->assertRegExp('/Queue "my:queue1" deleted/', $commandTester->getDisplay(), 'Deleted queue'); |
||
| 34 | } |
||
| 35 | } |
||
| 36 |