Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit 539dad7

Browse files
committed
update test
1 parent 1697d39 commit 539dad7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/phpunit/tests/admin/wpPluginDependencies.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,17 @@ private function make_method_accessible( $obj_or_class, $method ) {
9191
* @covers WP_Plugin_Dependencies::__construct
9292
*/
9393
public function test_construct_should_set_requires_plugins_and_plugin_data_to_empty_arrays() {
94-
$dependencies = new WP_Plugin_Dependencies();
95-
$requires_plugins = $this->make_prop_accessible( $dependencies, 'requires_plugins' );
96-
$plugin_data = $this->make_prop_accessible( $dependencies, 'plugin_data' );
94+
$dependencies = new WP_Plugin_Dependencies();
95+
$requires_plugins = $this->make_prop_accessible( $dependencies, 'requires_plugins' );
96+
$dependency_api_data = $this->make_prop_accessible( $dependencies, 'dependency_api_data' );
9797

98-
$actual_requires_plugins = $requires_plugins->getValue( $dependencies );
99-
$actual_plugin_data = $plugin_data->getValue( $dependencies );
98+
$actual_requires_plugins = $requires_plugins->getValue( $dependencies );
99+
$actual_dependency_api_data = $dependency_api_data->getValue( $dependencies );
100100

101101
$this->assertIsArray( $actual_requires_plugins, '$requires_plugins is not an array.' );
102102
$this->assertEmpty( $actual_requires_plugins, '$requires_plugins is not empty.' );
103-
$this->assertIsArray( $actual_plugin_data, '$plugin_data is not an array.' );
104-
$this->assertEmpty( $actual_plugin_data, '$plugin_data is not empty.' );
103+
$this->assertIsArray( $actual_dependency_api_data, '$dependency_api_data is not an array.' );
104+
$this->assertEmpty( $actual_dependency_api_data, '$dependency_api_data is not empty.' );
105105
}
106106

107107
/**
@@ -133,7 +133,7 @@ public function test_parse_plugin_headers( $plugins_data, $expected ) {
133133

134134
foreach ( $plugins_data as $name => $data ) {
135135
$plugin_data = array_map(
136-
static function( $value, $header ) {
136+
static function ( $value, $header ) {
137137
return $header . ': ' . $value;
138138
},
139139
$data,
@@ -164,7 +164,7 @@ static function( $value, $header ) {
164164
$test_plugin = basename( self::$plugins_dir ) . '/' . $plugin_file[0];
165165
$actual = array_filter(
166166
$actual,
167-
function( $key ) use ( $test_plugin ) {
167+
function ( $key ) use ( $test_plugin ) {
168168
return $test_plugin === $key;
169169
},
170170
ARRAY_FILTER_USE_KEY

0 commit comments

Comments
 (0)