Example #1
0
 /**
  * @test
  */
 public function it_should_fire_with_config_not_confirmed()
 {
     /**
      * Set
      *
      * @var \Mockery\Mock $command
      */
     $command = m::mock('Menthol\\Flexible\\Commands\\PathsCommand')->makePartial();
     $command->shouldAllowMockingProtectedMethods();
     File::clearResolvedInstance('files');
     File::shouldReceive('exists')->once()->andReturn(false);
     App::shouldReceive('make')->andReturn(true);
     /**
      * Expectation
      */
     $command->shouldReceive('getLaravel')->once()->andReturn(true);
     $command->shouldReceive('argument')->with('model')->once()->andReturn(['Husband']);
     $command->shouldReceive('option')->with('dir')->once()->andReturn([__DIR__ . '/../../../Support/Stubs']);
     $command->shouldReceive('option')->with('write-config')->once()->andReturn(true);
     $command->shouldReceive('confirm')->once()->andReturn(false);
     $command->shouldReceive('compilePaths', 'error', 'call', 'info')->andReturn(true);
     /*
     |------------------------------------------------------------
     | Assertion
     |------------------------------------------------------------
     */
     $command->fire();
 }