From 85fa983fe6df75fe6159c076f44748351b9cfe09 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 2 Aug 2024 17:46:38 +0200 Subject: [PATCH] Add ReflectionProperty::getSettableType() test for get-only backed property Fix test name while we're at it. --- ...ableType.phpt => ReflectionProperty_getSettableType.phpt} | 5 +++++ 1 file changed, 5 insertions(+) rename ext/reflection/tests/{ReflectionParameter_getSettableType.phpt => ReflectionProperty_getSettableType.phpt} (91%) diff --git a/ext/reflection/tests/ReflectionParameter_getSettableType.phpt b/ext/reflection/tests/ReflectionProperty_getSettableType.phpt similarity index 91% rename from ext/reflection/tests/ReflectionParameter_getSettableType.phpt rename to ext/reflection/tests/ReflectionProperty_getSettableType.phpt index caddaeb1ddf..ebf2185c95a 100644 --- a/ext/reflection/tests/ReflectionParameter_getSettableType.phpt +++ b/ext/reflection/tests/ReflectionProperty_getSettableType.phpt @@ -35,6 +35,10 @@ class Test { get => $this->backedTyped; set(int|string $value) => (int) $value; } + + public int $backedTypedGetOnly { + get => $this->backedTypedGetOnly; + } } $reflectionClass = new ReflectionClass(Test::class); @@ -53,3 +57,4 @@ string|int NULL int string|int +int