@@ -54,8 +54,7 @@ public function testGetList()
5454 ->with ('/notifications?all=1&participating=1&since=2005-08-17T00:00:00+00:00&before=2005-08-17T00:00:00+00:00 ' , [], 0 )
5555 ->willReturn ($ this ->response );
5656
57- $ response = json_decode ($ this ->response ->getBody ()->getContents ());
58- $ this ->response ->getBody ()->rewind ();
57+ $ response = json_decode ((string ) $ this ->response ->getBody ());
5958
6059 $ this ->assertEquals (
6160 $ response ,
@@ -79,8 +78,7 @@ public function testGetListRepository()
7978 ->with ('/repos/{owner}/{repo}/notifications? ' . $ args , [], 0 )
8079 ->willReturn ($ this ->response );
8180
82- $ response = json_decode ($ this ->response ->getBody ()->getContents ());
83- $ this ->response ->getBody ()->rewind ();
81+ $ response = json_decode ((string ) $ this ->response ->getBody ());
8482
8583 $ this ->assertEquals (
8684 $ response ,
@@ -111,8 +109,7 @@ public function testMarkRead()
111109 ->with ('/notifications ' , '{"unread":true,"read":true} ' , [], 0 )
112110 ->willReturn ($ this ->response );
113111
114- $ response = $ this ->response ->getBody ()->getContents ();
115- $ this ->response ->getBody ()->rewind ();
112+ $ response = (string ) $ this ->response ->getBody ();
116113
117114 $ this ->assertEquals (
118115 $ response ,
@@ -139,8 +136,7 @@ public function testMarkReadLastRead()
139136 ->with ('/notifications ' , $ data , [], 0 )
140137 ->willReturn ($ this ->response );
141138
142- $ response = $ this ->response ->getBody ()->getContents ();
143- $ this ->response ->getBody ()->rewind ();
139+ $ response = (string ) $ this ->response ->getBody ();
144140
145141 $ this ->assertEquals (
146142 $ response ,
@@ -166,8 +162,7 @@ public function testMarkReadRepository()
166162 ->with ('/repos/joomla/joomla-platform/notifications ' , $ data , [], 0 )
167163 ->willReturn ($ this ->response );
168164
169- $ response = $ this ->response ->getBody ()->getContents ();
170- $ this ->response ->getBody ()->rewind ();
165+ $ response = (string ) $ this ->response ->getBody ();
171166
172167 $ this ->assertEquals (
173168 $ response ,
@@ -195,7 +190,6 @@ public function testMarkReadRepositoryLastRead()
195190 ->willReturn ($ this ->response );
196191
197192 $ response = $ this ->response ->getBody ()->getContents ();
198- $ this ->response ->getBody ()->rewind ();
199193
200194 $ this ->assertEquals (
201195 $ response ,
@@ -218,7 +212,6 @@ public function testViewThread()
218212 ->willReturn ($ this ->response );
219213
220214 $ response = json_decode ($ this ->response ->getBody ()->getContents ());
221- $ this ->response ->getBody ()->rewind ();
222215
223216 $ this ->assertEquals (
224217 $ response ,
@@ -243,7 +236,6 @@ public function testMarkReadThread()
243236 ->willReturn ($ this ->response );
244237
245238 $ response = json_decode ($ this ->response ->getBody ()->getContents ());
246- $ this ->response ->getBody ()->rewind ();
247239
248240 $ this ->assertEquals (
249241 $ response ,
@@ -266,7 +258,6 @@ public function testGetThreadSubscription()
266258 ->willReturn ($ this ->response );
267259
268260 $ response = json_decode ($ this ->response ->getBody ()->getContents ());
269- $ this ->response ->getBody ()->rewind ();
270261
271262 $ this ->assertEquals (
272263 $ response ,
@@ -289,7 +280,6 @@ public function testSetThreadSubscription()
289280 ->willReturn ($ this ->response );
290281
291282 $ response = json_decode ($ this ->response ->getBody ()->getContents ());
292- $ this ->response ->getBody ()->rewind ();
293283
294284 $ this ->assertEquals (
295285 $ response ,
@@ -314,7 +304,6 @@ public function testDeleteThreadSubscription()
314304 ->willReturn ($ this ->response );
315305
316306 $ response = json_decode ($ this ->response ->getBody ()->getContents ());
317- $ this ->response ->getBody ()->rewind ();
318307
319308 $ this ->assertEquals (
320309 $ response ,
0 commit comments