add(new VersionCommand()); /** @var AbstractCommand $command */ $command = $application->find('version'); $command->setRuntime(new RuntimeMockup()); $tester = new CommandTester($command); $tester->execute(['command' => $command->getName()]); $output = trim($tester->getDisplay()); $this->assertEquals(sprintf('Magallanes v%s [%s]', Mage::VERSION, Mage::CODENAME), $output); } }