diff --git a/src/test/php/lang/ast/unittest/emit/PropertyHooksTest.class.php b/src/test/php/lang/ast/unittest/emit/PropertyHooksTest.class.php index 1b21aff0..9c302b6d 100755 --- a/src/test/php/lang/ast/unittest/emit/PropertyHooksTest.class.php +++ b/src/test/php/lang/ast/unittest/emit/PropertyHooksTest.class.php @@ -219,6 +219,27 @@ public function abstract_property() { Assert::equals('public abstract string $test', $t->property('test')->toString()); } + #[Test] + public function reflective_get() { + $t= $this->declare('class %T { + public string $test { get => "Test"; } + }'); + + $instance= $t->newInstance(); + Assert::equals('Test', $t->property('test')->get($instance)); + } + + #[Test] + public function reflective_set() { + $t= $this->declare('class %T { + public string $test { set => ucfirst($value); } + }'); + + $instance= $t->newInstance(); + $t->property('test')->set($instance, 'test'); + Assert::equals('Test', $instance->test); + } + #[Test] public function interface_hook() { $t= $this->declare('interface %T {