public function testTheWrapperTypeCanBeChanged() { $application = new Application(); $command = $application->find('compare'); $commandTester = new CommandTester($command); $commandTester->execute(array('command' => $command->getName(), '--type' => 'directory', 'previous' => __DIR__, 'latest' => __DIR__), ['verbosity' => OutputInterface::VERBOSITY_DEBUG]); $argument = $command->getDefinition()->getOption('type'); $this->assertNotEquals($argument->getDefault(), $commandTester->getInput()->getOption('type')); $this->assertNotContains('Unknown wrapper', $commandTester->getDisplay()); $this->assertContains('Total time', $commandTester->getDisplay()); }
public function testCanListAllPossibleCommands() { $application = new Application(); $command = $application->find('list'); $commandTester = new CommandTester($command); $commandTester->execute(array()); $output = $commandTester->getDisplay(); $this->assertRegExp('/list\\s*Lists/', $output); $this->assertContains('compare', $output); $this->assertContains('vcs:message', $output); }