コード例 #1
0
ファイル: FactoryTest.php プロジェクト: elepunk/oven
 public function testRunMethod()
 {
     $configurator = m::mock('Oven\\Recipe\\Configurator');
     $command = m::mock('Oven\\Command\\ConfigureCommand');
     $factory = new Factory($command, $configurator);
     $command->shouldReceive('argument')->once()->with('path')->andReturn($path = '/foo/bar');
     $configurator->shouldReceive('setup')->once()->with($path);
     $command->shouldReceive('say')->once()->with("info", "Your recipe path is now set to {$path}");
     $factory->run();
 }
コード例 #2
0
ファイル: ConfigureCommand.php プロジェクト: elepunk/oven
 /**
  * {@inheritdoc}
  */
 public function fire()
 {
     $configurator = new Configurator(new Filesystem());
     $factory = new Factory($this, $configurator);
     $factory->run();
 }