We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfd747f commit f37e113Copy full SHA for f37e113
src/test/php/lang/ast/unittest/emit/InitializeWithExpressionsTest.class.php
@@ -50,6 +50,19 @@ public function run() {
50
Assert::equals(new Handle(1), $r(new Handle(0)));
51
}
52
53
+ #[Test]
54
+ public function using_anonymous_classes() {
55
+ $r= $this->run('class <T> {
56
+ private $h= new class() { public function pipe($h) { return $h->redirect(1); } };
57
+
58
+ public function run() {
59
+ return $this->h;
60
+ }
61
+ }');
62
+ Assert::equals(new Handle(1), $r->pipe(new Handle(0)));
63
64
65
66
#[Test]
67
public function property_initialization_accessible_inside_constructor() {
68
$r= $this->run('use lang\ast\unittest\emit\Handle; class <T> {
0 commit comments