mirror of
https://hk.gh-proxy.com/https://github.com/wp-cli/profile-command.git
synced 2025-08-20 06:30:52 +08:00
Merge pull request #171 from wojsmol/fix/php81-compat
This commit is contained in:
commit
501625a1eb
2 changed files with 12 additions and 9 deletions
|
@ -10,11 +10,14 @@
|
|||
"wp-cli/wp-cli": "^2.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"wp-cli/wp-cli-tests": "^3"
|
||||
"wp-cli/wp-cli-tests": "^3.1"
|
||||
},
|
||||
"config": {
|
||||
"process-timeout": 7200,
|
||||
"sort-packages": true
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
|
|
@ -18,10 +18,10 @@ Feature: Profile a specific hook
|
|||
|
||||
When I run `wp profile hook --all --fields=callback,cache_hits,cache_misses`
|
||||
Then STDOUT should be a table containing rows:
|
||||
| callback | cache_hits | cache_misses |
|
||||
| sanitize_comment_cookies() | 0 | 0 |
|
||||
| smilies_init() | 2 | 0 |
|
||||
| feed_links() | 8 | 0 |
|
||||
| callback | cache_hits | cache_misses |
|
||||
| sanitize_comment_cookies() | 0 | 0 |
|
||||
| smilies_init() | 2 | 0 |
|
||||
| feed_links() | 12 | 0 |
|
||||
|
||||
@less-than-php-7 @require-wp-4.0
|
||||
Scenario: Profile an intermediate stage hook
|
||||
|
@ -29,9 +29,9 @@ Feature: Profile a specific hook
|
|||
|
||||
When I run `wp profile hook wp_head:before --fields=callback,cache_hits,cache_misses`
|
||||
Then STDOUT should be a table containing rows:
|
||||
| callback | cache_hits | cache_misses |
|
||||
| locate_template() | 0 | 0 |
|
||||
| load_template() | 0 | 0 |
|
||||
| callback | cache_hits | cache_misses |
|
||||
| parse_blocks() | 0 | 0 |
|
||||
| _get_wptexturize_split_regex() | 0 | 0 |
|
||||
And STDOUT should not contain:
|
||||
"""
|
||||
WP_CLI\Profile\Profiler->wp_tick_profile_begin()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue