Skip to content

Commit

Permalink
Fix new tests for older WordPress versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz committed Jul 17, 2024
1 parent 9bd99d4 commit da92041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/phpunit/tests/Dependencies/Script_Registry_Tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function test_add_inline_code() {
$this->registry->add_inline_code( 'test_script', $js );

if ( ! method_exists( wp_scripts(), 'get_inline_script_data' ) ) {
$this->assertSame( array( $js ), array_filter( wp_scripts()->get_data( 'test_script', 'after' ) ) );
$this->assertSame( array( $js ), array_values( array_filter( wp_scripts()->get_data( 'test_script', 'after' ) ) ) );
} else {
$this->assertSame( $js, wp_scripts()->get_inline_script_data( 'test_script' ) );
}
Expand Down

0 comments on commit da92041

Please sign in to comment.