Skip to content

Commit a38fb1d

Browse files
committed
BackfillFnTokenTest: rename two test cases
... to be more descriptive.
1 parent f539aa4 commit a38fb1d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/Core/Tokenizers/PHP/BackfillFnTokenTest.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ $fn = fn($x) : ?\My\NS\ClassName => $x;
7777
/* testReturnTypePartiallyQualifiedClass */
7878
$fn = fn($x) : ?NS\ClassName => $x;
7979

80-
/* testNullableNamespace */
80+
/* testNullableUnqualifiedClassName */
8181
$a = fn(?\DateTime $x) : ?\DateTime => $x;
8282

83-
/* testNamespaceOperatorInTypes */
83+
/* testNamespaceRelativeClassNameInTypes */
8484
$fn = fn(namespace\Foo $a) : ?namespace\Foo => $a;
8585

8686
/* testSelfReturnType */

tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public function testYield()
362362

363363

364364
/**
365-
* Test arrow functions that use nullable namespace types.
365+
* Test arrow functions that use nullable type with unqualified class name.
366366
*
367367
* @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional
368368
*
@@ -424,29 +424,29 @@ public function testReturnTypePartiallyQualifiedClass()
424424
*
425425
* @return void
426426
*/
427-
public function testNullableNamespace()
427+
public function testNullableUnqualifiedClassName()
428428
{
429-
$token = $this->getTargetToken('/* testNullableNamespace */', T_FN);
429+
$token = $this->getTargetToken('/* testNullableUnqualifiedClassName */', T_FN);
430430
$this->backfillHelper($token);
431431
$this->scopePositionTestHelper($token, 13, 16);
432432

433-
}//end testNullableNamespace()
433+
}//end testNullableUnqualifiedClassName()
434434

435435

436436
/**
437-
* Test arrow functions that use the namespace operator in the return type.
437+
* Test arrow functions that use namespace relative class name in the return type.
438438
*
439439
* @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional
440440
*
441441
* @return void
442442
*/
443-
public function testNamespaceOperatorInTypes()
443+
public function testNamespaceRelativeClassNameInTypes()
444444
{
445-
$token = $this->getTargetToken('/* testNamespaceOperatorInTypes */', T_FN);
445+
$token = $this->getTargetToken('/* testNamespaceRelativeClassNameInTypes */', T_FN);
446446
$this->backfillHelper($token);
447447
$this->scopePositionTestHelper($token, 12, 15);
448448

449-
}//end testNamespaceOperatorInTypes()
449+
}//end testNamespaceRelativeClassNameInTypes()
450450

451451

452452
/**

0 commit comments

Comments
 (0)