File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/test/php/lang/ast/unittest/emit Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ public function run() {
160160 }
161161
162162 #[Test]
163- public function instantiation () {
163+ public function instantiation_variadic () {
164164 $ f = $ this ->run ('use lang\ast\unittest\emit\Handle; class %T {
165165 public function run() {
166166 return new Handle(...);
@@ -169,6 +169,16 @@ public function run() {
169169 Assert::equals (new Handle (1 ), $ f (1 ));
170170 }
171171
172+ #[Test]
173+ public function instantiation_argument () {
174+ $ f = $ this ->run ('use lang\ast\unittest\emit\Handle; class %T {
175+ public function run() {
176+ return new Handle(?);
177+ }
178+ } ' );
179+ Assert::equals (new Handle (1 ), $ f (1 ));
180+ }
181+
172182 #[Test]
173183 public function instantiation_in_map () {
174184 $ r = $ this ->run ('use lang\ast\unittest\emit\Handle; class %T {
You can’t perform that action at this time.
0 commit comments