Exemple #1
0
 protected function _before()
 {
     $container = Robo::createDefaultContainer();
     $this->app = $container->get('application');
     $config = $container->get('config');
     $this->commandFactory = $container->get('commandFactory');
     $this->roboCommandFileInstance = new TestedRoboFile();
     $builder = $container->get('collectionBuilder', [$this->roboCommandFileInstance]);
     $this->roboCommandFileInstance->setBuilder($builder);
     $commandList = $this->commandFactory->createCommandsFromClass($this->roboCommandFileInstance);
     foreach ($commandList as $command) {
         $this->app->add($command);
     }
 }