- Timestamp:
- 09/11/2025 02:45:56 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme/wpThemeGetBlockPatterns.php
r58025 r60729 49 49 private function get_pattern_cache( $wp_theme ) { 50 50 $reflection = new ReflectionMethod( $wp_theme, 'get_pattern_cache' ); 51 $reflection->setAccessible( true ); 51 if ( PHP_VERSION_ID < 80100 ) { 52 $reflection->setAccessible( true ); 53 } 52 54 53 55 $pattern_cache = $reflection->invoke( $wp_theme, 'get_pattern_cache' ); 54 $reflection->setAccessible( false ); 56 if ( PHP_VERSION_ID < 80100 ) { 57 $reflection->setAccessible( false ); 58 } 55 59 56 60 return $pattern_cache; … … 65 69 private function get_cache_hash( $wp_theme ) { 66 70 $reflection = new ReflectionProperty( get_class( $wp_theme ), 'cache_hash' ); 67 $reflection->setAccessible( true ); 71 if ( PHP_VERSION_ID < 80100 ) { 72 $reflection->setAccessible( true ); 73 } 68 74 $cache_hash = $reflection->getValue( $wp_theme ); 69 $reflection->setAccessible( false ); 75 if ( PHP_VERSION_ID < 80100 ) { 76 $reflection->setAccessible( false ); 77 } 70 78 return $cache_hash; 71 79 }
Note: See TracChangeset
for help on using the changeset viewer.