/**
  *
  */
 public function testBuildWithInvalidStrategy()
 {
     $this->setExpectedException('Bcn\\MageBuild\\Exception\\InvalidStrategyException');
     $package = $this->getPackage('bcn/test1', '1.0.0', 'magento-module', self::SOURCE_DIR);
     $project = new Project();
     $project->addPackage($package);
     $project->setStrategy('test');
     $manager = new Builder($this->getPackageBuilder());
     $manager->build($project);
 }
 /**
  * @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 testIsForce()
 {
     $project = new Project();
     $project->setForce(true);
     $this->assertTrue($project->isForce());
 }
Exemple #4
0
 /**
  * @param  Project $project
  * @return bool
  */
 protected function isCoreBuilt(Project $project)
 {
     return $this->filesystem->exists($project->getTargetDir() . DIRECTORY_SEPARATOR . "index.php");
 }