diff --git a/tests/phpunit/tests/rest-api/rest-server.php b/tests/phpunit/tests/rest-api/rest-server.php index 288a93582813b..a49a6859a8ebb 100644 --- a/tests/phpunit/tests/rest-api/rest-server.php +++ b/tests/phpunit/tests/rest-api/rest-server.php @@ -1253,8 +1253,8 @@ public function test_get_index_should_return_site_icon_and_site_logo_fields( $fi $this->assertArrayHasKey( $expected_field, $response, "Expected \"{$expected_field}\" field is missing in the response." ); } - foreach ( $unexpected_fields as $not_expected_field ) { - $this->assertArrayNotHasKey( $not_expected_field, $response, "Response must not contain the \"{$not_expected_field}\" field." ); + foreach ( $unexpected_fields as $unexpected_field ) { + $this->assertArrayNotHasKey( $unexpected_field, $response, "Response must not contain the \"{$unexpected_field}\" field." ); } }