| @@ 23-37 (lines=15) @@ | ||
| 20 | */ |
|
| 21 | class RunHandlerCommandTest extends BaseCommandTestCase |
|
| 22 | { |
|
| 23 | public function testExecute() |
|
| 24 | { |
|
| 25 | $this->commandTester->execute( |
|
| 26 | [ |
|
| 27 | 'command' => $this->command->getName(), |
|
| 28 | 'handlerClass' => TestHandler::class, |
|
| 29 | ], |
|
| 30 | [ |
|
| 31 | 'verbosity' => OutputInterface::VERBOSITY_VERBOSE, |
|
| 32 | ] |
|
| 33 | ); |
|
| 34 | ||
| 35 | $output = $this->commandTester->getDisplay(); |
|
| 36 | $this->assertContains('No workload.', $output); |
|
| 37 | } |
|
| 38 | ||
| 39 | public function testExecuteWithWorkload() |
|
| 40 | { |
|
| @@ 39-54 (lines=16) @@ | ||
| 36 | $this->assertContains('No workload.', $output); |
|
| 37 | } |
|
| 38 | ||
| 39 | public function testExecuteWithWorkload() |
|
| 40 | { |
|
| 41 | $this->commandTester->execute( |
|
| 42 | [ |
|
| 43 | 'command' => $this->command->getName(), |
|
| 44 | 'handlerClass' => TestHandler::class, |
|
| 45 | 'workload' => 'Test workload 1', |
|
| 46 | ], |
|
| 47 | [ |
|
| 48 | 'verbosity' => OutputInterface::VERBOSITY_VERBOSE, |
|
| 49 | ] |
|
| 50 | ); |
|
| 51 | ||
| 52 | $output = $this->commandTester->getDisplay(); |
|
| 53 | $this->assertContains(strrev('Test workload 1'), $output); |
|
| 54 | } |
|
| 55 | ||
| 56 | public function testExecuteWithWorkloadNoVerbosity() |
|
| 57 | { |
|
| @@ 56-68 (lines=13) @@ | ||
| 53 | $this->assertContains(strrev('Test workload 1'), $output); |
|
| 54 | } |
|
| 55 | ||
| 56 | public function testExecuteWithWorkloadNoVerbosity() |
|
| 57 | { |
|
| 58 | $this->commandTester->execute( |
|
| 59 | [ |
|
| 60 | 'command' => $this->command->getName(), |
|
| 61 | 'handlerClass' => TestHandler::class, |
|
| 62 | 'workload' => 'Test workload 1', |
|
| 63 | ] |
|
| 64 | ); |
|
| 65 | ||
| 66 | $output = $this->commandTester->getDisplay(); |
|
| 67 | $this->assertEquals('', $output); |
|
| 68 | } |
|
| 69 | ||
| 70 | /** |
|
| 71 | * {@inheritdoc} |
|