@@ -81,10 +81,9 @@ public function testServerShouldBeReinstalledWhenModelIsPassed()
8181 $ this ->repository ->shouldNotReceive ('find ' );
8282
8383 $ this ->database ->shouldReceive ('beginTransaction ' )->withNoArgs ()->once ()->andReturnNull ();
84- $ this ->repository ->shouldReceive ('withoutFreshModel ' )->withNoArgs ()->once ()->andReturnSelf ()
85- ->shouldReceive ('update ' )->with ($ this ->server ->id , [
86- 'installed ' => 0 ,
87- ])->once ()->andReturnNull ();
84+ $ this ->repository ->shouldReceive ('withoutFreshModel->update ' )->with ($ this ->server ->id , [
85+ 'installed ' => 0 ,
86+ ], true , true )->once ()->andReturnNull ();
8887
8988 $ this ->daemonServerRepository ->shouldReceive ('setServer ' )->with ($ this ->server )->once ()->andReturnSelf ()
9089 ->shouldReceive ('reinstall ' )->withNoArgs ()->once ()->andReturn (new Response );
@@ -101,10 +100,9 @@ public function testServerShouldBeReinstalledWhenServerIdIsPassed()
101100 $ this ->repository ->shouldReceive ('find ' )->with ($ this ->server ->id )->once ()->andReturn ($ this ->server );
102101
103102 $ this ->database ->shouldReceive ('beginTransaction ' )->withNoArgs ()->once ()->andReturnNull ();
104- $ this ->repository ->shouldReceive ('withoutFreshModel ' )->withNoArgs ()->once ()->andReturnSelf ()
105- ->shouldReceive ('update ' )->with ($ this ->server ->id , [
106- 'installed ' => 0 ,
107- ])->once ()->andReturnNull ();
103+ $ this ->repository ->shouldReceive ('withoutFreshModel->update ' )->with ($ this ->server ->id , [
104+ 'installed ' => 0 ,
105+ ], true , true )->once ()->andReturnNull ();
108106
109107 $ this ->daemonServerRepository ->shouldReceive ('setServer ' )->with ($ this ->server )->once ()->andReturnSelf ()
110108 ->shouldReceive ('reinstall ' )->withNoArgs ()->once ()->andReturn (new Response );
@@ -121,10 +119,9 @@ public function testServerShouldBeReinstalledWhenServerIdIsPassed()
121119 public function testExceptionThrownByGuzzleShouldBeReRenderedAsDisplayable ()
122120 {
123121 $ this ->database ->shouldReceive ('beginTransaction ' )->withNoArgs ()->once ()->andReturnNull ();
124- $ this ->repository ->shouldReceive ('withoutFreshModel ' )->withNoArgs ()->once ()->andReturnSelf ()
125- ->shouldReceive ('update ' )->with ($ this ->server ->id , [
126- 'installed ' => 0 ,
127- ])->once ()->andReturnNull ();
122+ $ this ->repository ->shouldReceive ('withoutFreshModel->update ' )->with ($ this ->server ->id , [
123+ 'installed ' => 0 ,
124+ ], true , true )->once ()->andReturnNull ();
128125
129126 $ this ->daemonServerRepository ->shouldReceive ('setServer ' )->with ($ this ->server )->once ()->andThrow ($ this ->exception );
130127
@@ -139,10 +136,9 @@ public function testExceptionThrownByGuzzleShouldBeReRenderedAsDisplayable()
139136 public function testExceptionNotThrownByGuzzleShouldNotBeTransformedToDisplayable ()
140137 {
141138 $ this ->database ->shouldReceive ('beginTransaction ' )->withNoArgs ()->once ()->andReturnNull ();
142- $ this ->repository ->shouldReceive ('withoutFreshModel ' )->withNoArgs ()->once ()->andReturnSelf ()
143- ->shouldReceive ('update ' )->with ($ this ->server ->id , [
144- 'installed ' => 0 ,
145- ])->once ()->andReturnNull ();
139+ $ this ->repository ->shouldReceive ('withoutFreshModel->update ' )->with ($ this ->server ->id , [
140+ 'installed ' => 0 ,
141+ ], true , true )->once ()->andReturnNull ();
146142
147143 $ this ->daemonServerRepository ->shouldReceive ('setServer ' )->with ($ this ->server )->once ()->andThrow (new Exception ());
148144
0 commit comments