Skip to content

Commit abc5f5f

Browse files
committed
Arrow function tests: add verification of the arrow retokenization
1 parent 2da6904 commit abc5f5f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/Core/Tokenizer/BackfillFnTokenTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,8 @@ private function backfillHelper($token, $skipScopeCloserCheck=false)
783783
$this->assertTrue(array_key_exists('scope_opener', $tokens[$opener]), 'Opener scope opener is not set');
784784
$this->assertTrue(array_key_exists('scope_closer', $tokens[$opener]), 'Opener scope closer is not set');
785785
$this->assertSame($tokens[$opener]['scope_condition'], $token, 'Opener scope condition is not the T_FN token');
786+
$this->assertSame(T_FN_ARROW, $tokens[$opener]['code'], 'Arrow scope opener not tokenized as T_FN_ARROW (code)');
787+
$this->assertSame('T_FN_ARROW', $tokens[$opener]['type'], 'Arrow scope opener not tokenized as T_FN_ARROW (type)');
786788

787789
$closer = $tokens[$token]['scope_closer'];
788790
$this->assertTrue(array_key_exists('scope_condition', $tokens[$closer]), 'Closer scope condition is not set');

0 commit comments

Comments
 (0)