File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 19
19
use function PHPUnit \Framework \assertIsBool ;
20
20
use function PHPUnit \Framework \assertIsInt ;
21
21
use function PHPUnit \Framework \assertIsString ;
22
+ use function PHPUnit \Framework \assertNotInstanceOf ;
22
23
use function PHPUnit \Framework \assertNotNull ;
23
24
use function PHPUnit \Framework \assertNull ;
24
25
use function PHPUnit \Framework \assertObjectHasAttribute ;
@@ -134,6 +135,14 @@ public function assert(Throwable $e = null)
134
135
135
136
assertNotNull ($ e );
136
137
138
+ if (isset ($ this ->isClientError )) {
139
+ if ($ this ->isClientError ) {
140
+ assertNotInstanceOf (ServerException::class, $ e );
141
+ } else {
142
+ assertInstanceOf (ServerException::class, $ e );
143
+ }
144
+ }
145
+
137
146
if (isset ($ this ->messageContains )) {
138
147
assertStringContainsStringIgnoringCase ($ this ->messageContains , $ e ->getMessage ());
139
148
}
You can’t perform that action at this time.
0 commit comments