diff --git a/tests/e2e/config/wordpress-debug-log/index.js b/tests/e2e/config/wordpress-debug-log/index.js index 70a3d8f581f..2324e7a2a43 100644 --- a/tests/e2e/config/wordpress-debug-log/index.js +++ b/tests/e2e/config/wordpress-debug-log/index.js @@ -129,9 +129,13 @@ async function assertEmptyDebugLog() { // before the entries are recorded and result in a false success. await page.waitForTimeout( 1000 ); + // Filter out lines that are ignored. const filteredDebugLog = debugLogData.filter( ( line ) => { const lineWithoutTimestamp = line.replace( /^\[[^\]]+\]\s+/, '' ); - return ! ignoreList.includes( lineWithoutTimestamp ); + + return ! ignoreList.some( ( ignoreLine ) => + lineWithoutTimestamp.startsWith( ignoreLine ) + ); } ); if ( filteredDebugLog.length ) { diff --git a/tests/e2e/config/wordpress-debug-log/log-ignore-list.js b/tests/e2e/config/wordpress-debug-log/log-ignore-list.js index 7f177276d92..c8daed8e6f6 100644 --- a/tests/e2e/config/wordpress-debug-log/log-ignore-list.js +++ b/tests/e2e/config/wordpress-debug-log/log-ignore-list.js @@ -6,24 +6,19 @@ export const logIgnoreList = { '5.2.16': [ // Deprecated syntax or function calls which are fixed in later WP versions. - 'PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/wp-includes/load.php on line 926', - 'PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/wp-includes/formatting.php on line 2697', - 'PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/wp-includes/formatting.php on line 4803', - 'PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/wp-includes/class-wp-editor.php on line 749', - 'PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/wp-includes/class-wp-editor.php on line 750', - 'PHP Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in /var/www/html/wp-includes/SimplePie/Parse/Date.php on line 545', - 'PHP Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in /var/www/html/wp-includes/SimplePie/Parse/Date.php on line 546', + 'PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/wp-includes/load.php', + 'PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/wp-includes/formatting.php', + 'PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/wp-includes/class-wp-editor.php', + 'PHP Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in /var/www/html/wp-includes/SimplePie/Parse/Date.php', // These are guarded against in later WP versions. - 'PHP Notice: Trying to access array offset on value of type bool in /var/www/html/wp-admin/includes/update.php on line 673', - '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', + 'PHP Notice: Trying to access array offset on value of type bool in /var/www/html/wp-admin/includes/update.php', + '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', + 'PHP Notice: Trying to access array offset on value of type bool in /var/www/html/wp-includes/theme.php', ], nightly: [ - // Can be removed once WordPress AMP Plugin removes the deprecated function - // call. - // + // 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', + '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', ], };