Skip to content

Commit c1eea09

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

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
@@ -71,10 +71,10 @@ $a = [
7171
/* testYield */
7272
$a = fn($x) => yield 'k' => $x;
7373

74-
/* testNullableNamespace */
74+
/* testNullableUnqualifiedClassName */
7575
$a = fn(?\DateTime $x) : ?\DateTime => $x;
7676

77-
/* testNamespaceOperatorInTypes */
77+
/* testNamespaceRelativeClassNameInTypes */
7878
$fn = fn(namespace\Foo $a) : ?namespace\Foo => $a;
7979

8080
/* testSelfReturnType */

tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,35 +362,35 @@ 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
*
369369
* @return void
370370
*/
371-
public function testNullableNamespace()
371+
public function testNullableUnqualifiedClassName()
372372
{
373-
$token = $this->getTargetToken('/* testNullableNamespace */', T_FN);
373+
$token = $this->getTargetToken('/* testNullableUnqualifiedClassName */', T_FN);
374374
$this->backfillHelper($token);
375375
$this->scopePositionTestHelper($token, 15, 18);
376376

377-
}//end testNullableNamespace()
377+
}//end testNullableUnqualifiedClassName()
378378

379379

380380
/**
381-
* Test arrow functions that use the namespace operator in the return type.
381+
* Test arrow functions that use namespace relative class name in the return type.
382382
*
383383
* @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional
384384
*
385385
* @return void
386386
*/
387-
public function testNamespaceOperatorInTypes()
387+
public function testNamespaceRelativeClassNameInTypes()
388388
{
389-
$token = $this->getTargetToken('/* testNamespaceOperatorInTypes */', T_FN);
389+
$token = $this->getTargetToken('/* testNamespaceRelativeClassNameInTypes */', T_FN);
390390
$this->backfillHelper($token);
391391
$this->scopePositionTestHelper($token, 16, 19);
392392

393-
}//end testNamespaceOperatorInTypes()
393+
}//end testNamespaceRelativeClassNameInTypes()
394394

395395

396396
/**

0 commit comments

Comments
 (0)