add(new CommandBackup()); $command = $applicationd->find('backup'); $commandTester = new CommandTester($command); $commandTester->execute([]); $commandTester->assertCommandIsSuccessful(); // the output of the command in the console $output = $commandTester->getDisplay(); $this->assertStringContainsString('backup', $output); } }