Example #1
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function test_Should_ThrowWException_When_RollbackProcedureFails()
 {
     $this->mockAuthGuard->shouldReceive('user')->andReturn(new App\Models\User());
     Auth::shouldReceive('guard')->andReturn($this->mockAuthGuard);
     $this->mockDeploymentForm->shouldReceive('save')->once()->andReturn(false);
     $this->mockDeploymentForm->shouldReceive('errors')->once()->andReturn(new Illuminate\Support\MessageBag());
     $jsonRpc = new JsonRpc($this->mockProjectRepository, $this->mockDeploymentForm);
     $jsonRpc->rollback(1);
 }