Browse Source

Add failing test case

Kuba Werłos 3 years ago
parent
commit
58e6a4dd6a
1 changed files with 8 additions and 0 deletions
  1. 8 0
      tests/Tokenizer/Transformer/NullableTypeTransformerTest.php

+ 8 - 0
tests/Tokenizer/Transformer/NullableTypeTransformerTest.php

@@ -173,6 +173,14 @@ final class NullableTypeTransformerTest extends AbstractTransformerTestCase
                     41 => CT::T_NULLABLE_TYPE,
                 ],
             ],
+            [
+                '<?php
+                    function test(#[TestAttribute] ?User $user) {}
+                ',
+                [
+                    10 => CT::T_NULLABLE_TYPE,
+                ],
+            ],
         ];
     }
 }