Exemple #1
0
 /**
  * @When /^I run "([^"]*)" command with interactive set: "([^"]*)"$/
  */
 public function iRunCommandWithInteractive($name, $set)
 {
     $command = $this->application->find($name);
     $set = explode(',', $set);
     $count = 0;
     $dialog = $this->getMock('Symfony\\Component\\Console\\Helper\\DialogHelper', array('ask'));
     $dialog->expects($this->any())->method('ask')->will($this->returnCallback(function () use($set, &$count) {
         return $set[$count++];
     }));
     $command->getHelperSet()->set($dialog, 'dialog');
     $this->tester = new CommandTester($command);
     $this->exitCode = $this->tester->execute(array('strategy' => $this->strategy), array('interactive' => false));
 }
Exemple #2
0
#!/usr/bin/env php
<?php 
use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;
use Ticki\Core\Application\MainApplication;
/**
 * @var ClassLoader $loader
 */
$loader = (require __DIR__ . '/vendor/autoload.php');
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
date_default_timezone_set('UTC');
$application = new MainApplication();
$application->run();