Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/phpunit/tests/admin/plugin-dependencies/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ protected function call_method( $method, ...$args ) {
if ( PHP_VERSION_ID < 80100 ) {
self::$reflected_members[ $method ]->setAccessible( true );
}
$value = self::$reflected_members[ $method ]->invokeArgs( self::$instance, $args );
$object = self::$reflected_members[ $method ]->isStatic() ? null : self::$instance;
$value = self::$reflected_members[ $method ]->invokeArgs( $object, $args );
if ( PHP_VERSION_ID < 80100 ) {
self::$reflected_members[ $method ]->setAccessible( false );
}
Expand Down
13 changes: 1 addition & 12 deletions tests/phpunit/tests/theme/wpThemeJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -8515,18 +8515,7 @@ public static function data_custom_css_for_user_caps() {
* @param string $expected Expected results.
*/
public function test_process_blocks_custom_css( $input, $expected ) {
$theme_json = new WP_Theme_JSON(
array(
'version' => WP_Theme_JSON::LATEST_SCHEMA,
'styles' => array(),
)
);
$reflection = new ReflectionMethod( $theme_json, 'process_blocks_custom_css' );
if ( PHP_VERSION_ID < 80100 ) {
$reflection->setAccessible( true );
}

$this->assertSame( $expected, $reflection->invoke( $theme_json, $input['css'], $input['selector'] ) );
$this->assertSame( $expected, WP_Theme_JSON::process_blocks_custom_css( $input['css'], $input['selector'] ) );
}

/**
Expand Down
Loading