@@ -112,19 +112,19 @@ public function protected_set_reflection() {
112112 );
113113 }
114114
115- #[Test]
116- public function private_set_implicitely_final_in_reflection () {
115+ #[Test, Values([ ' protected ' , ' public ' ]) ]
116+ public function private_set_implicitely_final_in_reflection ($ modifier ) {
117117 $ t = $ this ->declare ('class %T {
118- public private(set) string $fixture= "Test";
118+ ' . $ modifier . ' private(set) string $fixture= "Test";
119119 } ' );
120120
121121 Assert::equals (
122- ' public final private(set) string $fixture ' ,
122+ $ modifier . ' final private(set) string $fixture ' ,
123123 $ t ->property ('fixture ' )->toString ()
124124 );
125125 }
126126
127- #[Test, Values(['protected ' , 'public ' ])]
127+ #[Test, Values(['private ' , ' protected ' , 'public ' ])]
128128 public function same_modifier_for_get_and_set ($ modifier ) {
129129 $ t = $ this ->declare ('class %T {
130130 ' .$ modifier .' ' .$ modifier .'(set) string $fixture= "Test";
@@ -136,18 +136,6 @@ public function same_modifier_for_get_and_set($modifier) {
136136 );
137137 }
138138
139- #[Test]
140- public function private_modifier_for_get_and_set () {
141- $ t = $ this ->declare ('class %T {
142- private private(set) string $fixture= "Test";
143- } ' );
144-
145- Assert::equals (
146- 'private final string $fixture ' ,
147- $ t ->property ('fixture ' )->toString ()
148- );
149- }
150-
151139 #[Test]
152140 public function interaction_with_hooks () {
153141 $ t = $ this ->declare ('class %T {
0 commit comments