public function test_Should_NotThrowWException_When_RollbackProcedureSucceeds() { try { $this->mockAuthGuard->shouldReceive('user')->andReturn(new App\Models\User()); Auth::shouldReceive('guard')->andReturn($this->mockAuthGuard); $this->mockDeploymentForm->shouldReceive('save')->once()->andReturn(true); $this->mockProjectModel->shouldReceive('getLastDeployment'); $this->mockProjectRepository->shouldReceive('byId')->andReturn($this->mockProjectModel); $jsonRpc = new JsonRpc($this->mockProjectRepository, $this->mockDeploymentForm); $jsonRpc->deploy(1); $this->assertTrue(true); } catch (Exception $e) { $this->fail($e->getMessage()); } }