Example #1
0
 /**
  *
  */
 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);
 }
Example #2
0
 /**
  * @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);
 }
Example #3
0
 public function testStrategy()
 {
     $project = new Project();
     $project->setStrategy("foo");
     $this->assertEquals("foo", $project->getStrategy());
 }