@@ -34,7 +34,7 @@ Feature: Profile a specific hook
3434 | load_template () | 0 | 0 |
3535 And STDOUT should not contain:
3636 """
37- runcommand \Profile\Profiler->wp_tick_profile_begin()
37+ WP_CLI \Profile\Profiler->wp_tick_profile_begin()
3838 """
3939
4040 @require-wp-4.0
@@ -74,18 +74,18 @@ Feature: Profile a specific hook
7474 And a wp-content/mu-plugins/shutdown.php file:
7575 """
7676 <?php
77- function runcommand_shutdown_hook () {
77+ function wp_cli_shutdown_hook () {
7878 wp_cache_get( 'foo' );
7979 }
80- add_action( 'shutdown', 'runcommand_shutdown_hook ' );
80+ add_action( 'shutdown', 'wp_cli_shutdown_hook ' );
8181 """
8282
8383 When I run `wp profile hook shutdown --fields=callback,cache_hits,cache_misses`
8484 Then STDOUT should be a table containing rows:
85- | callback | cache_hits | cache_misses |
86- | runcommand_shutdown_hook () | 0 | 1 |
87- | wp_ob_end_flush_all () | 0 | 0 |
88- | total (2 ) | 0 | 1 |
85+ | callback | cache_hits | cache_misses |
86+ | wp_cli_shutdown_hook () | 0 | 1 |
87+ | wp_ob_end_flush_all () | 0 | 0 |
88+ | total (2 ) | 0 | 1 |
8989 And STDERR should be empty
9090
9191 @require-wp-4.0
@@ -94,18 +94,18 @@ Feature: Profile a specific hook
9494 And a wp-content/mu-plugins/custom-action.php file:
9595 """
9696 <?php
97- function runcommand_custom_action_hook () {
97+ function wp_cli_custom_action_hook () {
9898 wp_cache_get( 'foo' );
9999 }
100- add_action( 'runcommand_custom_action ', 'runcommand_custom_action_hook ' );
101- do_action( 'runcommand_custom_action ' );
100+ add_action( 'wp_cli_custom_action ', 'wp_cli_custom_action_hook ' );
101+ do_action( 'wp_cli_custom_action ' );
102102 """
103103
104- When I run `wp profile hook runcommand_custom_action --fields=callback,location,cache_hits,cache_misses`
104+ When I run `wp profile hook wp_cli_custom_action --fields=callback,location,cache_hits,cache_misses`
105105 Then STDOUT should be a table containing rows:
106- | callback | location | cache_hits | cache_misses |
107- | runcommand_custom_action_hook () | mu -plugins /custom -action .php :2 | 0 | 1 |
108- | total (1 ) | | 0 | 1 |
106+ | callback | location | cache_hits | cache_misses |
107+ | wp_cli_custom_action_hook () | mu -plugins /custom -action .php :2 | 0 | 1 |
108+ | total (1 ) | | 0 | 1 |
109109 And STDERR should be empty
110110
111111 @require-wp-4.4
0 commit comments