/**
  * @param  InputInterface  $input
  * @param  OutputInterface $output
  * @return int|null|void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $targetDir = $input->getArgument('magento-root-path');
     $this->ensureDirectoryExists($targetDir);
     $project = new Project();
     $project->setTargetDir($targetDir);
     $project->setForce($input->getOption('force'));
     $project->setStrategy($input->getOption('strategy'));
     foreach ($this->getBuildPackages() as $package) {
         $project->addPackage($package);
     }
     $this->getBuilder()->build($project);
 }
 /**
  *
  */
 public function testExtensionBuild()
 {
     $package = $this->getPackage('bcn/test1', '1.0.0', 'magento-module', self::SOURCE_DIR);
     $project = new Project();
     $project->addPackage($package);
     $project->setTargetDir(self::TARGET_DIR);
     $project->setStrategy('test');
     $strategy = $this->getStrategy();
     $builder = $this->getPackageBuilder();
     $builder->expects($this->once())->method('build')->with($this->equalTo($package), $this->equalTo(self::TARGET_DIR), $this->equalTo($strategy));
     $manager = new Builder($builder);
     $manager->addStrategy('test', $strategy);
     $manager->build($project);
 }