@@ -112,19 +112,19 @@ public function protected_set_reflection() {
112
112
);
113
113
}
114
114
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 ) {
117
117
$ t = $ this ->declare ('class %T {
118
- public private(set) string $fixture= "Test";
118
+ ' . $ modifier . ' private(set) string $fixture= "Test";
119
119
} ' );
120
120
121
121
Assert::equals (
122
- ' public final private(set) string $fixture ' ,
122
+ $ modifier . ' final private(set) string $fixture ' ,
123
123
$ t ->property ('fixture ' )->toString ()
124
124
);
125
125
}
126
126
127
- #[Test, Values(['protected ' , 'public ' ])]
127
+ #[Test, Values(['private ' , ' protected ' , 'public ' ])]
128
128
public function same_modifier_for_get_and_set ($ modifier ) {
129
129
$ t = $ this ->declare ('class %T {
130
130
' .$ modifier .' ' .$ modifier .'(set) string $fixture= "Test";
@@ -136,18 +136,6 @@ public function same_modifier_for_get_and_set($modifier) {
136
136
);
137
137
}
138
138
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
-
151
139
#[Test]
152
140
public function interaction_with_hooks () {
153
141
$ t = $ this ->declare ('class %T {
0 commit comments