Example #1
0
 /**
  * {@inheritdoc}
  */
 public function fire()
 {
     $filesystem = new Filesystem();
     $reader = new Reader($filesystem);
     $builder = new Builder($this, new Configurator($filesystem), new Worker($reader));
     return $builder->run();
 }
Example #2
0
 public function testRunWithEmptyArgumentMethod()
 {
     $command = m::mock('Oven\\Command\\BakeCommand');
     $configurator = m::mock('Oven\\Recipe\\Configurator');
     $worker = m::mock('Oven\\Worker');
     $builder = new Builder($command, $configurator, $worker);
     $command->shouldReceive('option')->once()->with('f')->andReturn(false);
     $command->shouldReceive('option')->once()->with('ignore-namespace')->andReturn(false);
     $command->shouldReceive('option')->twice()->with('recipe')->andReturn('/foo/bar');
     $command->shouldReceive('argument')->once()->with('output')->andReturn('foo');
     $command->shouldReceive('option')->twice()->with('destination')->andReturn('/foo/bar');
     $command->shouldReceive('argument')->once()->with('items')->andReturn([]);
     $worker->shouldReceive('build')->once();
     $builder->run();
 }