-
Notifications
You must be signed in to change notification settings - Fork 385
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 deprecated _admin_bar_bump_cb
; Fix failing PHP unit tests
#7635
Merged
+157
−125
Merged
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a4e9b28
Fix deprecation due to `_admin_bar_bump_cb`
thelovekesh 9d74e5c
Remove decoding attribute from img tag markup in test cases
thelovekesh bb221a3
Update string contains string assertions for amp scripts
thelovekesh c8bff40
Fix validation sources in AMP validation manager test cases
thelovekesh 818cb53
Fix source stack trace in AMP validation manager test cases
thelovekesh e256ad9
Update https status detection in SupportData service
thelovekesh 4f1c893
Fix version compare with alpha version
thelovekesh 08e20ff
Fix test cases in LikelyCulpritDetectorTest
thelovekesh c598023
Update wp emoji styles removal based on latest core changes
thelovekesh 6986676
Update Test_AMP_Theme_Support test cases
thelovekesh 1778bfd
Update Test_Uninstall test cases
thelovekesh 33de5e3
Update `version_compare` to handle WP alpha version comparisons effic…
thelovekesh 159a2e0
Update PHPUnit tests workflow to be overridden for experimental jobs
thelovekesh 8f63063
Revert wp_print_styles action removal in latest wp versions
thelovekesh 3cd9b29
Add env variable on job level in PHPUnit workflows
thelovekesh 7eff1f0
Remove `wp-emoji-styles` dequeue hook obselete callback function
thelovekesh 82fe088
Add comment upon removal of wp_print_styles hook in test cases
thelovekesh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,13 +128,13 @@ public function single_step_trace_data() { | |
], | ||
|
||
'parent theme' => [ | ||
[ get_template_directory() . '/functions.php' ], | ||
[ '{{ get_template_directory }}/functions.php' ], | ||
'theme', | ||
'default', | ||
], | ||
|
||
'child theme' => [ | ||
[ get_stylesheet_directory() . '/functions.php' ], | ||
[ '{{ get_stylesheet_directory }}/functions.php' ], | ||
'theme', | ||
'default', | ||
], | ||
|
@@ -167,8 +167,8 @@ public function multi_step_trace_data() { | |
__FILE__, // AMP plugin is skipped. | ||
WP_PLUGIN_DIR . '/bad-plugin/bad-plugin.php', // <== Likely culprit. | ||
WP_CONTENT_DIR . '/mu-plugins/bad-mu-plugin.php', | ||
get_template_directory() . '/functions.php', | ||
get_stylesheet_directory() . '/functions.php', | ||
'{{ get_template_directory }}/functions.php', | ||
'{{ get_stylesheet_directory }}/functions.php', | ||
], | ||
'plugin', | ||
'bad-plugin', | ||
|
@@ -180,8 +180,8 @@ public function multi_step_trace_data() { | |
__FILE__, // AMP plugin is skipped. | ||
WP_CONTENT_DIR . '/mu-plugins/bad-mu-plugin.php', // <== Likely culprit. | ||
WP_PLUGIN_DIR . '/bad-plugin/bad-plugin.php', | ||
get_template_directory() . '/functions.php', | ||
get_stylesheet_directory() . '/functions.php', | ||
'{{ get_template_directory }}/functions.php', | ||
'{{ get_stylesheet_directory }}/functions.php', | ||
], | ||
'mu-plugin', | ||
'bad-mu-plugin.php', | ||
|
@@ -191,10 +191,10 @@ public function multi_step_trace_data() { | |
[ | ||
ABSPATH . '/wp-includes/some-file.php', // Core is skipped. | ||
__FILE__, // AMP plugin is skipped. | ||
get_template_directory() . '/functions.php', // <== Likely culprit. | ||
'{{ get_template_directory }}/functions.php', // <== Likely culprit. | ||
WP_PLUGIN_DIR . '/bad-plugin/bad-plugin.php', | ||
WP_CONTENT_DIR . '/mu-plugins/bad-mu-plugin.php', | ||
get_stylesheet_directory() . '/functions.php', | ||
'{{ get_stylesheet_directory }}/functions.php', | ||
], | ||
'theme', | ||
'default', | ||
|
@@ -204,10 +204,10 @@ public function multi_step_trace_data() { | |
[ | ||
ABSPATH . '/wp-includes/some-file.php', // Core is skipped. | ||
__FILE__, // AMP plugin is skipped. | ||
get_stylesheet_directory() . '/functions.php', // <== Likely culprit. | ||
'{{ get_stylesheet_directory }}/functions.php', // <== Likely culprit. | ||
WP_PLUGIN_DIR . '/bad-plugin/bad-plugin.php', | ||
WP_CONTENT_DIR . '/mu-plugins/bad-mu-plugin.php', | ||
get_template_directory() . '/functions.php', | ||
'{{ get_template_directory }}/functions.php', | ||
], | ||
'theme', | ||
'default', | ||
|
@@ -275,7 +275,12 @@ public function test_analyze_trace( $file_stack, $expected_type, $expected_name | |
private function get_trace_from_file_stack( $file_stack ) { | ||
return array_map( | ||
static function ( $file ) { | ||
return [ 'file' => $file ]; | ||
$file = str_replace( '{{ get_template_directory }}', get_template_directory(), $file ); | ||
$file = str_replace( '{{ get_stylesheet_directory }}', get_stylesheet_directory(), $file ); | ||
|
||
return [ | ||
'file' => $file, | ||
]; | ||
Comment on lines
-278
to
+283
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😎 |
||
}, | ||
$file_stack | ||
); | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😎