diff --git a/tests/Tokenizer/Transformer/BraceTransformerTest.php b/tests/Tokenizer/Transformer/BraceTransformerTest.php index 76d1e2d3af1..a9914755d29 100644 --- a/tests/Tokenizer/Transformer/BraceTransformerTest.php +++ b/tests/Tokenizer/Transformer/BraceTransformerTest.php @@ -463,6 +463,38 @@ class PropertyHooks 32 => CT::T_PROPERTY_HOOK_BRACE_CLOSE, ], ]; + + yield 'property hooks: some more curly braces within hook' => [ + <<<'PHP' + callable = $value; + } else { + $this->callable = static function (): void { + $foo = new class implements \Stringable { + public function __toString(): string { + echo 'Na'; + } + }; + + for ($i = 0; $i < 8; $i++) { + echo (string) $foo; + } + }; + } + } + } // << this one + } + PHP, + [ + 11 => CT::T_PROPERTY_HOOK_BRACE_OPEN, + 143 => CT::T_PROPERTY_HOOK_BRACE_CLOSE, + ], + ]; } /**