Merge branch 'develop' into feature/client-api

This commit is contained in:
Dane Everitt 2018-02-27 19:49:06 -06:00
commit d4e331c20a
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
13 changed files with 106 additions and 28 deletions

View file

@ -81,10 +81,9 @@ class ReinstallServerServiceTest extends TestCase
$this->repository->shouldNotReceive('find');
$this->database->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull();
$this->repository->shouldReceive('withoutFreshModel')->withNoArgs()->once()->andReturnSelf()
->shouldReceive('update')->with($this->server->id, [
'installed' => 0,
])->once()->andReturnNull();
$this->repository->shouldReceive('withoutFreshModel->update')->with($this->server->id, [
'installed' => 0,
], true, true)->once()->andReturnNull();
$this->daemonServerRepository->shouldReceive('setServer')->with($this->server)->once()->andReturnSelf()
->shouldReceive('reinstall')->withNoArgs()->once()->andReturn(new Response);
@ -101,10 +100,9 @@ class ReinstallServerServiceTest extends TestCase
$this->repository->shouldReceive('find')->with($this->server->id)->once()->andReturn($this->server);
$this->database->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull();
$this->repository->shouldReceive('withoutFreshModel')->withNoArgs()->once()->andReturnSelf()
->shouldReceive('update')->with($this->server->id, [
'installed' => 0,
])->once()->andReturnNull();
$this->repository->shouldReceive('withoutFreshModel->update')->with($this->server->id, [
'installed' => 0,
], true, true)->once()->andReturnNull();
$this->daemonServerRepository->shouldReceive('setServer')->with($this->server)->once()->andReturnSelf()
->shouldReceive('reinstall')->withNoArgs()->once()->andReturn(new Response);
@ -121,10 +119,9 @@ class ReinstallServerServiceTest extends TestCase
public function testExceptionThrownByGuzzleShouldBeReRenderedAsDisplayable()
{
$this->database->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull();
$this->repository->shouldReceive('withoutFreshModel')->withNoArgs()->once()->andReturnSelf()
->shouldReceive('update')->with($this->server->id, [
'installed' => 0,
])->once()->andReturnNull();
$this->repository->shouldReceive('withoutFreshModel->update')->with($this->server->id, [
'installed' => 0,
], true, true)->once()->andReturnNull();
$this->daemonServerRepository->shouldReceive('setServer')->with($this->server)->once()->andThrow($this->exception);
@ -139,10 +136,9 @@ class ReinstallServerServiceTest extends TestCase
public function testExceptionNotThrownByGuzzleShouldNotBeTransformedToDisplayable()
{
$this->database->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull();
$this->repository->shouldReceive('withoutFreshModel')->withNoArgs()->once()->andReturnSelf()
->shouldReceive('update')->with($this->server->id, [
'installed' => 0,
])->once()->andReturnNull();
$this->repository->shouldReceive('withoutFreshModel->update')->with($this->server->id, [
'installed' => 0,
], true, true)->once()->andReturnNull();
$this->daemonServerRepository->shouldReceive('setServer')->with($this->server)->once()->andThrow(new Exception());