diff --git a/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.inc b/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.inc index cbb7b63bfc..af9bd3166e 100644 --- a/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.inc +++ b/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.inc @@ -71,10 +71,10 @@ $a = [ /* testYield */ $a = fn($x) => yield 'k' => $x; -/* testNullableNamespace */ +/* testNullableUnqualifiedClassName */ $a = fn(?\DateTime $x) : ?\DateTime => $x; -/* testNamespaceOperatorInTypes */ +/* testNamespaceRelativeClassNameInTypes */ $fn = fn(namespace\Foo $a) : ?namespace\Foo => $a; /* testSelfReturnType */ diff --git a/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php b/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php index 4519d1e92e..d5cf019b87 100644 --- a/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php +++ b/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php @@ -362,35 +362,35 @@ public function testYield() /** - * Test arrow functions that use nullable namespace types. + * Test arrow functions that use nullable type with unqualified class name. * * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional * * @return void */ - public function testNullableNamespace() + public function testNullableUnqualifiedClassName() { - $token = $this->getTargetToken('/* testNullableNamespace */', T_FN); + $token = $this->getTargetToken('/* testNullableUnqualifiedClassName */', T_FN); $this->backfillHelper($token); $this->scopePositionTestHelper($token, 15, 18); - }//end testNullableNamespace() + }//end testNullableUnqualifiedClassName() /** - * Test arrow functions that use the namespace operator in the return type. + * Test arrow functions that use namespace relative class name in the return type. * * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional * * @return void */ - public function testNamespaceOperatorInTypes() + public function testNamespaceRelativeClassNameInTypes() { - $token = $this->getTargetToken('/* testNamespaceOperatorInTypes */', T_FN); + $token = $this->getTargetToken('/* testNamespaceRelativeClassNameInTypes */', T_FN); $this->backfillHelper($token); $this->scopePositionTestHelper($token, 16, 19); - }//end testNamespaceOperatorInTypes() + }//end testNamespaceRelativeClassNameInTypes() /**