@@ -545,6 +545,8 @@ public function testFindStartInsideSwitchCaseDefaultStatements($testMarker, $tar
545
545
*/
546
546
public static function dataFindStartInsideSwitchCaseDefaultStatements ()
547
547
{
548
+ $ php8Names = parent ::usesPhp8NameTokens ();
549
+
548
550
return [
549
551
'Case keyword should be start of case statement - case itself ' => [
550
552
'testMarker ' => '/* testCaseStatement */ ' ,
@@ -607,16 +609,22 @@ public static function dataFindStartInsideSwitchCaseDefaultStatements()
607
609
'targets ' => \T_CLOSE_PARENTHESIS ,
608
610
'expectedTarget ' => \T_THROW ,
609
611
],
610
- 'Goto should be start for contents of the goto statement - goto label ' => [
612
+ 'Goto should be start for contents of the goto statement - goto label ' => [
611
613
'testMarker ' => '/* testInsideCaseGotoStatement */ ' ,
612
614
'targets ' => \T_STRING ,
613
615
'expectedTarget ' => \T_GOTO ,
614
616
],
615
- 'Goto should be start for contents of the goto statement - semicolon ' => [
617
+ 'Goto should be start for contents of the goto statement - semicolon ' => [
616
618
'testMarker ' => '/* testInsideCaseGotoStatement */ ' ,
617
619
'targets ' => \T_SEMICOLON ,
618
620
'expectedTarget ' => \T_GOTO ,
619
621
],
622
+ 'Namespace separator for "die" should be start for contents of the die statement - close parenthesis ' => [
623
+ // Note: not sure if this is actually correct - should this be the open parenthesis ?
624
+ 'testMarker ' => '/* testInsideCaseFullyQualifiedDieStatement */ ' ,
625
+ 'targets ' => T_CLOSE_PARENTHESIS ,
626
+ 'expectedTarget ' => ($ php8Names === true ? T_EXIT : T_NS_SEPARATOR ),
627
+ ],
620
628
'Default keyword should be start of default statement - default itself ' => [
621
629
'testMarker ' => '/* testDefaultStatement */ ' ,
622
630
'targets ' => \T_DEFAULT ,
0 commit comments