1
1
<?php
2
2
/**
3
- * Tests the retokenization of the `default` keyword to T_MATCH_DEFAULT for PHP 8.0 match structures
4
- * and makes sure that the tokenization of switch `T_DEFAULT` structures is not aversely affected.
3
+ * Tests that switch "default" statements get scope indexes, while match "default" statements do not.
5
4
*
6
5
* @author Juliette Reinders Folmer <[email protected] >
7
6
* @copyright 2020-2021 Squiz Pty Ltd (ABN 77 084 670 600)
@@ -17,7 +16,7 @@ final class RecurseScopeMapDefaultKeywordConditionsTest extends AbstractTokenize
17
16
18
17
19
18
/**
20
- * Test the retokenization of the ` default` keyword for match structure to `T_MATCH_DEFAULT` .
19
+ * Test that match " default" tokens does not get scope indexes .
21
20
*
22
21
* Note: Cases and default structures within a match structure do *NOT* get case/default scope
23
22
* conditions, in contrast to case and default structures in switch control structures.
@@ -103,8 +102,7 @@ public static function dataMatchDefault()
103
102
104
103
105
104
/**
106
- * Verify that the retokenization of `T_DEFAULT` tokens in match constructs, doesn't negatively
107
- * impact the tokenization of `T_DEFAULT` tokens in switch control structures.
105
+ * Test that switch "default" tokens do get the scope indexes.
108
106
*
109
107
* Note: Cases and default structures within a switch control structure *do* get case/default scope
110
108
* conditions.
@@ -220,9 +218,7 @@ public static function dataSwitchDefault()
220
218
221
219
222
220
/**
223
- * Verify that the retokenization of `T_DEFAULT` tokens in match constructs, doesn't negatively
224
- * impact the tokenization of `T_STRING` tokens with the contents 'default' which aren't in
225
- * actual fact the default keyword.
221
+ * Test that a "default" keyword which is not a switch or match default, does not get the scope indexes.
226
222
*
227
223
* @param string $testMarker The comment prefacing the target token.
228
224
* @param string $testContent The token content to look for.
0 commit comments