@@ -545,6 +545,8 @@ public function testFindStartInsideSwitchCaseDefaultStatements($testMarker, $tar
545545 */
546546 public static function dataFindStartInsideSwitchCaseDefaultStatements ()
547547 {
548+ $ php8Names = parent ::usesPhp8NameTokens ();
549+
548550 return [
549551 'Case keyword should be start of case statement - case itself ' => [
550552 'testMarker ' => '/* testCaseStatement */ ' ,
@@ -607,16 +609,22 @@ public static function dataFindStartInsideSwitchCaseDefaultStatements()
607609 'targets ' => \T_CLOSE_PARENTHESIS ,
608610 'expectedTarget ' => \T_THROW ,
609611 ],
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 ' => [
611613 'testMarker ' => '/* testInsideCaseGotoStatement */ ' ,
612614 'targets ' => \T_STRING ,
613615 'expectedTarget ' => \T_GOTO ,
614616 ],
615- 'Goto should be start for contents of the goto statement - semicolon ' => [
617+ 'Goto should be start for contents of the goto statement - semicolon ' => [
616618 'testMarker ' => '/* testInsideCaseGotoStatement */ ' ,
617619 'targets ' => \T_SEMICOLON ,
618620 'expectedTarget ' => \T_GOTO ,
619621 ],
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+ ],
620628 'Default keyword should be start of default statement - default itself ' => [
621629 'testMarker ' => '/* testDefaultStatement */ ' ,
622630 'targets ' => \T_DEFAULT ,
0 commit comments