File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,13 @@ public function set_up() {
2222 self ::$ base = Utils \normalize_path ( __DIR__ ) . '/data/ ' ;
2323
2424 $ property = new \ReflectionProperty ( TestIterableCodeExtractor::class, 'dir ' );
25- $ property ->setAccessible ( true );
25+ if ( PHP_VERSION_ID < 80100 ) {
26+ $ property ->setAccessible ( true );
27+ }
2628 $ property ->setValue ( null , self ::$ base );
27- $ property ->setAccessible ( false );
29+ if ( PHP_VERSION_ID < 80100 ) {
30+ $ property ->setAccessible ( false );
31+ }
2832 }
2933
3034 public function tear_down () {
@@ -211,7 +215,9 @@ public function test_can_include_file_in_symlinked_folder() {
211215 protected static function get_method_as_public ( $ class_name , $ method_name ) {
212216 $ class = new \ReflectionClass ( $ class_name );
213217 $ method = $ class ->getMethod ( $ method_name );
214- $ method ->setAccessible ( true );
218+ if ( PHP_VERSION_ID < 80100 ) {
219+ $ method ->setAccessible ( true );
220+ }
215221 return $ method ;
216222 }
217223
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ public function set_up() {
2727 self ::$ obj = new MakeJsonCommand ();
2828 $ reflection = new \ReflectionClass ( get_class ( self ::$ obj ) );
2929 self ::$ build_map = $ reflection ->getMethod ( 'build_map ' );
30- self ::$ build_map ->setAccessible ( true );
30+ if ( PHP_VERSION_ID < 80100 ) {
31+ self ::$ build_map ->setAccessible ( true );
32+ }
3133 }
3234
3335 public function test_no_map () {
You can’t perform that action at this time.
0 commit comments