diff --git a/Tests/BackCompat/BCFile/GetMethodPropertiesTest.php b/Tests/BackCompat/BCFile/GetMethodPropertiesTest.php index 1dd8d3dd..ec24a9dd 100644 --- a/Tests/BackCompat/BCFile/GetMethodPropertiesTest.php +++ b/Tests/BackCompat/BCFile/GetMethodPropertiesTest.php @@ -341,12 +341,14 @@ public function testReturnNamespace() */ public function testReturnMultilineNamespace() { + $php8Names = parent::usesPhp8NameTokens(); + $expected = [ 'scope' => 'public', 'scope_specified' => false, 'return_type' => '\MyNamespace\MyClass\Foo', 'return_type_token' => 7, // Offset from the T_FUNCTION token. - 'return_type_end_token' => 23, // Offset from the T_FUNCTION token. + 'return_type_end_token' => ($php8Names === true) ? 20 : 23, // Offset from the T_FUNCTION token. 'nullable_return_type' => false, 'is_abstract' => false, 'is_final' => false, diff --git a/Tests/Utils/PassedParameters/GetParametersNamedTest.php b/Tests/Utils/PassedParameters/GetParametersNamedTest.php index 3b28667b..ecbe66ce 100644 --- a/Tests/Utils/PassedParameters/GetParametersNamedTest.php +++ b/Tests/Utils/PassedParameters/GetParametersNamedTest.php @@ -109,7 +109,7 @@ public function dataGetParameters() ], 3 => [ 'start' => ($php8Names === true) ? 7 : 8, - 'end' => ($php8Names === true) ? 7 : 11, + 'end' => ($php8Names === true) ? 8 : 11, 'raw' => 'MyNS\VALUE', ], ],