diff --git a/src/PHPStan/HigherOrderExpectationTypeExtension.php b/src/PHPStan/HigherOrderExpectationTypeExtension.php index 7b7cdfec..fdf51198 100644 --- a/src/PHPStan/HigherOrderExpectationTypeExtension.php +++ b/src/PHPStan/HigherOrderExpectationTypeExtension.php @@ -37,7 +37,7 @@ final readonly class HigherOrderExpectationTypeExtension implements ExpressionTy $varType = $scope->getType($expr->var); - if (! (new ObjectType(HigherOrderExpectation::class))->isSuperTypeOf($varType)->yes()) { + if (! new ObjectType(HigherOrderExpectation::class)->isSuperTypeOf($varType)->yes()) { return null; } diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index b87c2279..bd761d83 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -1699,6 +1699,8 @@ PASS Tests\Unit\Expectations\OppositeExpectation ✓ it throw expectation failed exception with string argument ✓ it throw expectation failed exception with array argument + ✓ it does not truncate long string arguments in error message + ✓ it does not truncate custom error message when using not() PASS Tests\Unit\Overrides\ThrowableBuilder ✓ collision editor can be added to the stack trace @@ -1903,4 +1905,4 @@ ✓ pass with dataset with ('my-datas-set-value') ✓ within describe → pass with dataset with ('my-datas-set-value') - Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 40 todos, 35 skipped, 1296 passed (2977 assertions) \ No newline at end of file + Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 40 todos, 35 skipped, 1298 passed (2982 assertions) \ No newline at end of file diff --git a/tests/Visual/Parallel.php b/tests/Visual/Parallel.php index be17ebde..329c6528 100644 --- a/tests/Visual/Parallel.php +++ b/tests/Visual/Parallel.php @@ -23,13 +23,13 @@ test('parallel', function () use ($run) { $file = file_get_contents(__FILE__); $file = preg_replace( '/\$expected = \'.*?\';/', - "\$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1280 passed (2926 assertions)';", + "\$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1282 passed (2931 assertions)';", $file, ); file_put_contents(__FILE__, $file); } - $expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1280 passed (2926 assertions)'; + $expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 27 skipped, 1282 passed (2931 assertions)'; expect($output) ->toContain("Tests: {$expected}")