Skip to content

Commit a0b4f54

Browse files
limingxinleozxyfaxcnsy-records
authored
Upgrade docs for v3.1 (#6335)
Co-authored-by: zxyfaxcn <[email protected]> Co-authored-by: Lu Fei <[email protected]>
1 parent 429de8f commit a0b4f54

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Http/TestResponse.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,10 @@ public function decodeResponseJson()
549549
$decodedResponse = $testJson->json();
550550

551551
if (is_null($decodedResponse) || $decodedResponse === false) {
552-
if ($this->exception ?? null) {
553-
throw $this->exception;
554-
}
552+
$exception = $this->exception ?? null;
553+
554+
$exception && throw $exception;
555+
555556
PHPUnit::fail('Invalid JSON was returned from the route.');
556557
}
557558

0 commit comments

Comments
 (0)