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(); }
/** * {@inheritdoc} */ public function fire() { $configurator = new Configurator(new Filesystem()); $factory = new Factory($this, $configurator); $factory->run(); }