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 1919use function PHPUnit \Framework \assertIsBool ;
2020use function PHPUnit \Framework \assertIsInt ;
2121use function PHPUnit \Framework \assertIsString ;
22+ use function PHPUnit \Framework \assertNotInstanceOf ;
2223use function PHPUnit \Framework \assertNotNull ;
2324use function PHPUnit \Framework \assertNull ;
2425use function PHPUnit \Framework \assertObjectHasAttribute ;
@@ -134,6 +135,14 @@ public function assert(Throwable $e = null)
134135
135136 assertNotNull ($ e );
136137
138+ if (isset ($ this ->isClientError )) {
139+ if ($ this ->isClientError ) {
140+ assertNotInstanceOf (ServerException::class, $ e );
141+ } else {
142+ assertInstanceOf (ServerException::class, $ e );
143+ }
144+ }
145+
137146 if (isset ($ this ->messageContains )) {
138147 assertStringContainsStringIgnoringCase ($ this ->messageContains , $ e ->getMessage ());
139148 }
You can’t perform that action at this time.
0 commit comments