Skip to content

Commit 1b15f97

Browse files
committed
fixed build error
1 parent 929af8e commit 1b15f97

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/phpunit/tests/dependencies/scripts.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,8 +1484,9 @@ public function test_highest_fetchpriority_with_dependents_uses_cached_result_fo
14841484

14851485
// Access the private method using reflection.
14861486
$method = new ReflectionMethod( WP_Scripts::class, 'get_highest_fetchpriority_with_dependents' );
1487-
$method->setAccessible( true );
1488-
1487+
if ( PHP_VERSION_ID < 80100 ) {
1488+
$method->setAccessible( true );
1489+
}
14891490
// Pass `$stored_results` BY REFERENCE.
14901491
$result = $method->invokeArgs( $wp_scripts, array( 'd', array(), &$stored_results ) );
14911492

@@ -1649,8 +1650,9 @@ public function test_filter_eligible_strategies_uses_cached_result_for_shared_de
16491650

16501651
// Access the private method via reflection.
16511652
$method = new ReflectionMethod( WP_Scripts::class, 'filter_eligible_strategies' );
1652-
$method->setAccessible( true );
1653-
1653+
if ( PHP_VERSION_ID < 80100 ) {
1654+
$method->setAccessible( true );
1655+
}
16541656
// Invoke the method with `$stored_results` passed by reference.
16551657
$result = $method->invokeArgs( $wp_scripts, array( 'd', null, array(), &$stored_results ) );
16561658

0 commit comments

Comments
 (0)