Ejemplo n.º 1
0
 public function testExecute()
 {
     $conveyor = new \Webcreate\Conveyor\Conveyor();
     $application = new \Webcreate\Conveyor\Console\Application($conveyor);
     $application->add(new \Webcreate\Conveyor\Command\InitCommand());
     $conveyor->boot(new \Webcreate\Conveyor\IO\NullIO());
     $this->assertFileNotExists($this->tmpdir . '/conveyor.yml');
     $command = $application->find('init');
     $commandTester = new \Symfony\Component\Console\Tester\CommandTester($command);
     $commandTester->execute(array('command' => $command->getName()));
     $this->assertFileExists($this->tmpdir . '/conveyor.yml');
 }
Ejemplo n.º 2
0
 public function testExecute()
 {
     $conveyor = new \Webcreate\Conveyor\Conveyor();
     $application = new Application($conveyor);
     $application->add(new VersionsCommand());
     $conveyor->boot(new \Webcreate\Conveyor\IO\NullIO());
     $command = $application->find('versions');
     $commandTester = new CommandTester($command);
     $commandTester->execute(array('command' => $command->getName()));
     $output = $commandTester->getDisplay();
     $this->assertContains('dev-feature1', $output);
     $this->assertContains('dev-trunk', $output);
     $this->assertContains('2.1', $output);
 }