Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/hide deprecation notices in PHP/E2E tests #7646

Merged
merged 9 commits into from
Oct 2, 2023
Merged
7 changes: 7 additions & 0 deletions tests/e2e/config/wordpress-debug-log/log-ignore-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,11 @@ export const logIgnoreList = {
'PHP Notice: Trying to access array offset on value of type null in /var/www/html/wp-includes/rest-api/class-wp-rest-request.php on line 337',
'PHP Notice: Trying to access array offset on value of type bool in /var/www/html/wp-includes/theme.php on line 2360',
],
nightly: [
// Can be removed once WordPress AMP Plugin removes the deprecated function
// call.
//
// See: https://github.com/ampproject/amp-wp/issues/7619
'PHP Deprecated: Function _admin_bar_bump_cb is deprecated since version 6.4.0! Use wp_enqueue_admin_bar_bump_styles instead. in /var/www/html/wp-includes/functions.php on line 6032',
],
};
3 changes: 2 additions & 1 deletion tests/phpunit/integration/Modules/AnalyticsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,10 @@ public function test_tracking_disabled( $settings, $logged_in, $is_tracking_acti
wp_scripts()->queue = array();
wp_scripts()->done = array();
wp_styles(); // Prevent potential ->queue of non-object error.
remove_all_actions( 'wp_enqueue_scripts' );

// Remove irrelevant script from throwing errors in CI from readfile().
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );

// Set the current user (can be 0 for no user)
$role = $is_content_creator ? 'administrator' : 'subscriber';
$user = $logged_in ?
Expand Down