| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function testExecute(): void { |
||
| 33 | |||
| 34 | // Set an Application mock. |
||
| 35 | $application = new Application(static::$kernel); |
||
| 36 | $application->add(new CopySkeletonCommand()); |
||
| 37 | |||
| 38 | // Set a Command mock. |
||
| 39 | $command = $application->find("wbw:core:copy-skeleton"); |
||
| 40 | |||
| 41 | // Set a Command tester. |
||
| 42 | $commandTester = new CommandTester($command); |
||
| 43 | |||
| 44 | $res = $commandTester->execute([ |
||
| 45 | "command" => $command->getName(), |
||
| 46 | ]); |
||
| 47 | $this->assertEquals(0, $res); |
||
| 48 | |||
| 49 | $output = $commandTester->getDisplay(); |
||
| 50 | $this->assertStringContainsString("Trying to copy skeletons", $output); |
||
| 51 | $this->assertStringContainsString("[OK] No skeleton were provided by any bundle", $output); |
||
| 52 | } |
||
| 54 |