mirror of
https://hk.gh-proxy.com/https://github.com/wp-cli/profile-command.git
synced 2025-08-20 06:28:26 +08:00
Failing test case for profiling muplugins_loaded:before
This commit is contained in:
parent
16ddb3c3dc
commit
b60edfa0d8
1 changed files with 17 additions and 0 deletions
|
@ -120,3 +120,20 @@ Feature: Profile a specific hook
|
||||||
"""
|
"""
|
||||||
Warning: Called 1
|
Warning: Called 1
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Scenario: Profile the mu_plugins:before hook
|
||||||
|
Given a WP install
|
||||||
|
And a wp-content/mu-plugins/awesome-file.php file:
|
||||||
|
"""
|
||||||
|
<?php
|
||||||
|
function awesome_func() {
|
||||||
|
// does nothing
|
||||||
|
}
|
||||||
|
awesome_func();
|
||||||
|
"""
|
||||||
|
|
||||||
|
When I run `wp profile hook muplugins_loaded:before --fields=callback`
|
||||||
|
Then STDOUT should contain:
|
||||||
|
"""
|
||||||
|
wp-content/mu-plugins/awesome-file.php
|
||||||
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue