File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
src/test/php/lang/ast/unittest/emit Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
<?php namespace lang \ast \unittest \emit ;
2
2
3
- use unittest \{Assert , Test };
3
+ use unittest \{Assert , Test , Values };
4
4
5
5
class CallableSyntaxTest extends EmittingTest {
6
6
@@ -67,26 +67,26 @@ public function run() {
67
67
Assert::equals (4 , $ f ('Test ' ));
68
68
}
69
69
70
- #[Test]
71
- public function variable_instance_method () {
70
+ #[Test, Values([ ' $this->$func(...) ' , ' $this->{$func}(...) ' ]) ]
71
+ public function variable_instance_method ($ expr ) {
72
72
$ f = $ this ->run ('class <T> {
73
73
private function length($arg) { return strlen($arg); }
74
74
public function run() {
75
75
$func= "length";
76
- return $this->$func(...) ;
76
+ return ' . $ expr . ' ;
77
77
}
78
78
} ' );
79
79
80
80
Assert::equals (4 , $ f ('Test ' ));
81
81
}
82
82
83
- #[Test]
84
- public function variable_class_method () {
83
+ #[Test, Values([ ' self::$func(...) ' , ' self::{$func}(...) ' ]) ]
84
+ public function variable_class_method ($ expr ) {
85
85
$ f = $ this ->run ('class <T> {
86
86
private static function length($arg) { return strlen($arg); }
87
87
public function run() {
88
88
$func= "length";
89
- return self::$func(...) ;
89
+ return ' . $ expr . ' ;
90
90
}
91
91
} ' );
92
92
You can’t perform that action at this time.
0 commit comments