diff --git a/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapDefaultKeywordConditionsTest.php b/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapDefaultKeywordConditionsTest.php index 064ce8f407..b8ef8f689f 100644 --- a/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapDefaultKeywordConditionsTest.php +++ b/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapDefaultKeywordConditionsTest.php @@ -112,7 +112,8 @@ public static function dataMatchDefault() * @param string $testMarker The comment prefacing the target token. * @param int $openerOffset The expected offset of the scope opener in relation to the testMarker. * @param int $closerOffset The expected offset of the scope closer in relation to the testMarker. - * @param int|null $conditionStop The expected offset at which tokens stop having T_DEFAULT as a scope condition. + * @param int|null $conditionStop The expected offset in relation to the testMarker, at which tokens stop + * having T_DEFAULT as a scope condition. * @param string $testContent The token content to look for. * * @dataProvider dataSwitchDefault @@ -158,7 +159,7 @@ public function testSwitchDefault($testMarker, $openerOffset, $closerOffset, $co if (($opener + 1) !== $closer) { $end = $closer; if (isset($conditionStop) === true) { - $end = $conditionStop; + $end = ($token + $conditionStop); } for ($i = ($opener + 1); $i < $end; $i++) {