@@ -37,30 +37,22 @@ public static function setBrowserKitAssertionsAsVerbose(bool $verbose): void
37
37
38
38
public static function assertResponseIsSuccessful (string $ message = '' , ?bool $ verbose = null ): void
39
39
{
40
- $ verbose ??= self ::$ defaultVerboseMode ;
41
-
42
- self ::assertThatForResponse (new ResponseConstraint \ResponseIsSuccessful ($ verbose ), $ message );
40
+ self ::assertThatForResponse (new ResponseConstraint \ResponseIsSuccessful ($ verbose ?? self ::$ defaultVerboseMode ), $ message );
43
41
}
44
42
45
43
public static function assertResponseStatusCodeSame (int $ expectedCode , string $ message = '' , ?bool $ verbose = null ): void
46
44
{
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 );
50
46
}
51
47
52
48
public static function assertResponseFormatSame (?string $ expectedFormat , string $ message = '' , ?bool $ verbose = null ): void
53
49
{
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 );
57
51
}
58
52
59
53
public static function assertResponseRedirects (?string $ expectedLocation = null , ?int $ expectedCode = null , string $ message = '' , ?bool $ verbose = null ): void
60
54
{
61
- $ verbose ??= self ::$ defaultVerboseMode ;
62
-
63
- $ constraint = new ResponseConstraint \ResponseIsRedirected ($ verbose );
55
+ $ constraint = new ResponseConstraint \ResponseIsRedirected ($ verbose ?? self ::$ defaultVerboseMode );
64
56
if ($ expectedLocation ) {
65
57
if (class_exists (ResponseConstraint \ResponseHeaderLocationSame::class)) {
66
58
$ locationConstraint = new ResponseConstraint \ResponseHeaderLocationSame (self ::getRequest (), $ expectedLocation );
@@ -117,9 +109,7 @@ public static function assertResponseCookieValueSame(string $name, string $expec
117
109
118
110
public static function assertResponseIsUnprocessable (string $ message = '' , ?bool $ verbose = null ): void
119
111
{
120
- $ verbose ??= self ::$ defaultVerboseMode ;
121
-
122
- self ::assertThatForResponse (new ResponseConstraint \ResponseIsUnprocessable ($ verbose ), $ message );
112
+ self ::assertThatForResponse (new ResponseConstraint \ResponseIsUnprocessable ($ verbose ?? self ::$ defaultVerboseMode ), $ message );
123
113
}
124
114
125
115
public static function assertBrowserHasCookie (string $ name , string $ path = '/ ' , ?string $ domain = null , string $ message = '' ): void
0 commit comments