@@ -141,8 +141,10 @@ public function testExecuteWhenRevisionsAreProvidedAsOptions(): void
141
141
$ this ->performCheckout ->expects (self ::exactly (2 ))
142
142
->method ('checkout ' )
143
143
->willReturnCallback (function (CheckedOutRepository $ repository , Revision $ sha ) use ($ fromSha , $ toSha ) {
144
+ $ stringRevision = (string ) $ sha ;
145
+
144
146
self ::assertEquals ($ repository , $ this ->sourceRepository );
145
- self ::assertTrue (( string ) $ sha === $ fromSha || ( string ) $ sha === $ toSha );
147
+ self ::assertTrue ($ stringRevision === $ fromSha || $ stringRevision === $ toSha );
146
148
147
149
return $ this ->sourceRepository ;
148
150
});
@@ -204,8 +206,10 @@ public function testExecuteWhenDevelopmentDependenciesAreRequested(): void
204
206
$ this ->performCheckout ->expects (self ::exactly (2 ))
205
207
->method ('checkout ' )
206
208
->willReturnCallback (function (CheckedOutRepository $ repository , Revision $ sha ) use ($ fromSha , $ toSha ) {
209
+ $ stringRevision = (string ) $ sha ;
210
+
207
211
self ::assertEquals ($ repository , $ this ->sourceRepository );
208
- self ::assertTrue (( string ) $ sha === $ fromSha || ( string ) $ sha === $ toSha );
212
+ self ::assertTrue ($ stringRevision === $ fromSha || $ stringRevision === $ toSha );
209
213
210
214
return $ this ->sourceRepository ;
211
215
});
@@ -268,8 +272,10 @@ public function testExecuteReturnsNonZeroExitCodeWhenChangesAreDetected(): void
268
272
$ this ->performCheckout ->expects (self ::exactly (2 ))
269
273
->method ('checkout ' )
270
274
->willReturnCallback (function (CheckedOutRepository $ repository , Revision $ sha ) use ($ fromSha , $ toSha ) {
275
+ $ stringRevision = (string ) $ sha ;
276
+
271
277
self ::assertEquals ($ repository , $ this ->sourceRepository );
272
- self ::assertTrue (( string ) $ sha === $ fromSha || ( string ) $ sha === $ toSha );
278
+ self ::assertTrue ($ stringRevision === $ fromSha || $ stringRevision === $ toSha );
273
279
274
280
return $ this ->sourceRepository ;
275
281
});
@@ -344,8 +350,10 @@ public function testProvidingMarkdownOptionWritesMarkdownOutput(): void
344
350
$ this ->performCheckout ->expects (self ::exactly (2 ))
345
351
->method ('checkout ' )
346
352
->willReturnCallback (function (CheckedOutRepository $ repository , Revision $ sha ) use ($ fromSha , $ toSha ) {
353
+ $ stringRevision = (string ) $ sha ;
354
+
347
355
self ::assertEquals ($ repository , $ this ->sourceRepository );
348
- self ::assertTrue (( string ) $ sha === $ fromSha || ( string ) $ sha === $ toSha );
356
+ self ::assertTrue ($ stringRevision === $ fromSha || $ stringRevision === $ toSha );
349
357
350
358
return $ this ->sourceRepository ;
351
359
});
@@ -457,8 +465,10 @@ public function testExecuteWithDefaultRevisionsNotProvided(VersionCollection $ve
457
465
$ this ->performCheckout ->expects (self ::exactly (2 ))
458
466
->method ('checkout ' )
459
467
->willReturnCallback (function (CheckedOutRepository $ repository , Revision $ sha ) use ($ fromSha , $ toSha ) {
468
+ $ stringRevision = (string ) $ sha ;
469
+
460
470
self ::assertEquals ($ repository , $ this ->sourceRepository );
461
- self ::assertTrue (( string ) $ sha === $ fromSha || ( string ) $ sha === $ toSha );
471
+ self ::assertTrue ($ stringRevision === $ fromSha || $ stringRevision === $ toSha );
462
472
463
473
return $ this ->sourceRepository ;
464
474
});
0 commit comments