Skip to content

Commit 892ba78

Browse files
committed
Update test suite to improve PHP 8.4+ support
1 parent 9dcf6c6 commit 892ba78

5 files changed

+8
-8
lines changed

tests/FunctionAnyTestRejectedShouldReportUnhandled.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ any([
2020
--EXPECTF--
2121
Unhandled promise rejection with React\Promise\Exception\CompositeException: All promises rejected. in %s:%d
2222
Stack trace:
23-
#0 %s/src/Promise.php(%d): React\Promise\{closure}(%S)
23+
#0 %s/src/Promise.php(%d): %S{closure%S}(%S)
2424
#1 %s/src/Promise.php(%d): React\Promise\Promise->call(%S)
2525
#2 %s/src/functions.php(%d): React\Promise\Promise->__construct(%S)
2626
#3 %s(%d): React\Promise\any(%S)

tests/FunctionRejectTestFinallyThatThrowsNewExceptionShouldReportUnhandledForNewExceptionOnly.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ reject(new RuntimeException('foo'))->finally(function (): void {
1818
--EXPECTF--
1919
Unhandled promise rejection with RuntimeException: Finally! in %s:%d
2020
Stack trace:
21-
#0 %s/src/Internal/RejectedPromise.php(%d): {closure}(%S)
22-
#1 %s/src/Internal/RejectedPromise.php(%d): React\Promise\Internal\RejectedPromise->React\Promise\Internal\{closure}(%S)
21+
#0 %s/src/Internal/RejectedPromise.php(%d): {closure%S}(%S)
22+
#1 %s/src/Internal/RejectedPromise.php(%d): React\Promise\Internal\RejectedPromise->%S{closure%S}(%S)
2323
#2 %s/src/Internal/RejectedPromise.php(%d): React\Promise\Internal\RejectedPromise->then(%S)
2424
#3 %s(%d): React\Promise\Internal\RejectedPromise->finally(%S)
2525
#4 %A{main}

tests/FunctionRejectTestThenMatchingThatThrowsNewExceptionShouldReportUnhandledRejectionForNewExceptionOnly.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ reject(new RuntimeException('foo'))->then(null, function () {
1818
--EXPECTF--
1919
Unhandled promise rejection with RuntimeException: bar in %s:%d
2020
Stack trace:
21-
#0 %s/src/Internal/RejectedPromise.php(%d): {closure}(%S)
21+
#0 %s/src/Internal/RejectedPromise.php(%d): {closure%S}(%S)
2222
#1 %s(%d): React\Promise\Internal\RejectedPromise->then(%S)
2323
#2 %A{main}

tests/FunctionRejectTestThenMismatchThrowsTypeErrorAndShouldReportUnhandledForTypeErrorOnlyOnPhp8.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ reject(new RuntimeException('foo'))->then(null, function (UnexpectedValueExcepti
1818

1919
?>
2020
--EXPECTF--
21-
Unhandled promise rejection with TypeError: {closure}(): Argument #1 ($unexpected) must be of type UnexpectedValueException, RuntimeException given, called in %s/src/Internal/RejectedPromise.php on line %d in %s:%d
21+
Unhandled promise rejection with TypeError: {closure%S}(): Argument #1 ($unexpected) must be of type UnexpectedValueException, RuntimeException given, called in %s/src/Internal/RejectedPromise.php on line %d in %s:%d
2222
Stack trace:
23-
#0 %s/src/Internal/RejectedPromise.php(%d): {closure}(%S)
23+
#0 %s/src/Internal/RejectedPromise.php(%d): {closure%S}(%S)
2424
#1 %s(%d): React\Promise\Internal\RejectedPromise->then(%S)
2525
#2 %A{main}

tests/FunctionSetRejectionHandlerThatTriggersErrorHandlerThatThrowsShouldTerminateProgramForUnhandled.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ echo 'NEVER';
2727
--EXPECTF--
2828
Fatal error: Uncaught OverflowException from unhandled promise rejection handler: This function should never throw in %s:%d
2929
Stack trace:
30-
#0 [internal function]: {closure}(%S)
30+
#0 [internal function]: {closure%S}(%S)
3131
#1 %s(%d): trigger_error(%S)
32-
#2 %s/src/Internal/RejectedPromise.php(%d): {closure}(%S)
32+
#2 %s/src/Internal/RejectedPromise.php(%d): {closure%S}(%S)
3333
#3 %s/src/functions.php(%d): React\Promise\Internal\RejectedPromise->__destruct()
3434
#4 %s(%d): React\Promise\reject(%S)
3535
#5 %A{main}

0 commit comments

Comments
 (0)