public function testContainsApplication()
 {
     $subject = new AbstractCommandTest_Subject();
     $app = new Application();
     $app->addCommands([$subject]);
     $this->assertNotNull($subject->getApplication());
     $this->assertInstanceOf('PHPSemVer\\Console\\Application', $subject->getApplication());
 }
 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);
 }
 public function testHasTheCorrectVersion()
 {
     $application = new Application();
     $this->assertEquals(PHPSEMVER_VERSION, $application->getVersion());
 }