Example #1
0
 /**
  * Constructor.
  *
  * Set env and load config.
  *
  * @param string $env Optianlly set environment
  * @return void
  */
 public function __construct($env = null)
 {
     $this->env = $env;
     $pathsHelper = new Paths();
     $pathsHelper->setGeneratedConfigFilePrefix($env ?: '');
     $this->utils = new UtilManager();
     $this->utils->register('paths', $pathsHelper);
     $this->loadConfig();
 }
 /**
  * @When /^I run the Show command$/
  */
 public function iRunTheShowCommand()
 {
     $pathUtil = new Paths();
     $pathUtil->setGeneratedConfigDir(dirname(__FILE__) . '/../../data');
     $manager = new Manager();
     $manager->register('paths', $pathUtil);
     $application = new Application();
     $application->add(new ShowCommand($manager));
     $command = $application->find('show');
     $commandTester = new CommandTester($command);
     $commandTester->execute(array('command' => $command->getName(), '--env' => $this->env));
     $this->output = $commandTester->getDisplay();
 }