@@ -37,30 +37,22 @@ public static function setBrowserKitAssertionsAsVerbose(bool $verbose): void
3737
3838 public static function assertResponseIsSuccessful (string $ message = '' , ?bool $ verbose = null ): void
3939 {
40- $ verbose ??= self ::$ defaultVerboseMode ;
41-
42- self ::assertThatForResponse (new ResponseConstraint \ResponseIsSuccessful ($ verbose ), $ message );
40+ self ::assertThatForResponse (new ResponseConstraint \ResponseIsSuccessful ($ verbose ?? self ::$ defaultVerboseMode ), $ message );
4341 }
4442
4543 public static function assertResponseStatusCodeSame (int $ expectedCode , string $ message = '' , ?bool $ verbose = null ): void
4644 {
47- $ verbose ??= self ::$ defaultVerboseMode ;
48-
49- self ::assertThatForResponse (new ResponseConstraint \ResponseStatusCodeSame ($ expectedCode , $ verbose ), $ message );
45+ self ::assertThatForResponse (new ResponseConstraint \ResponseStatusCodeSame ($ expectedCode , $ verbose ?? self ::$ defaultVerboseMode ), $ message );
5046 }
5147
5248 public static function assertResponseFormatSame (?string $ expectedFormat , string $ message = '' , ?bool $ verbose = null ): void
5349 {
54- $ verbose ??= self ::$ defaultVerboseMode ;
55-
56- self ::assertThatForResponse (new ResponseConstraint \ResponseFormatSame (self ::getRequest (), $ expectedFormat , $ verbose ), $ message );
50+ self ::assertThatForResponse (new ResponseConstraint \ResponseFormatSame (self ::getRequest (), $ expectedFormat , $ verbose ?? self ::$ defaultVerboseMode ), $ message );
5751 }
5852
5953 public static function assertResponseRedirects (?string $ expectedLocation = null , ?int $ expectedCode = null , string $ message = '' , ?bool $ verbose = null ): void
6054 {
61- $ verbose ??= self ::$ defaultVerboseMode ;
62-
63- $ constraint = new ResponseConstraint \ResponseIsRedirected ($ verbose );
55+ $ constraint = new ResponseConstraint \ResponseIsRedirected ($ verbose ?? self ::$ defaultVerboseMode );
6456 if ($ expectedLocation ) {
6557 if (class_exists (ResponseConstraint \ResponseHeaderLocationSame::class)) {
6658 $ locationConstraint = new ResponseConstraint \ResponseHeaderLocationSame (self ::getRequest (), $ expectedLocation );
@@ -117,9 +109,7 @@ public static function assertResponseCookieValueSame(string $name, string $expec
117109
118110 public static function assertResponseIsUnprocessable (string $ message = '' , ?bool $ verbose = null ): void
119111 {
120- $ verbose ??= self ::$ defaultVerboseMode ;
121-
122- self ::assertThatForResponse (new ResponseConstraint \ResponseIsUnprocessable ($ verbose ), $ message );
112+ self ::assertThatForResponse (new ResponseConstraint \ResponseIsUnprocessable ($ verbose ?? self ::$ defaultVerboseMode ), $ message );
123113 }
124114
125115 public static function assertBrowserHasCookie (string $ name , string $ path = '/ ' , ?string $ domain = null , string $ message = '' ): void
0 commit comments