From a590f1be0d5b6c4d7b360c56dcc84d0a36525d2d Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Fri, 7 Oct 2016 15:58:08 -0700 Subject: [PATCH] Assert hooks for each stage --- features/profile-stage.feature | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/features/profile-stage.feature b/features/profile-stage.feature index cf9e3e4..984dc12 100644 --- a/features/profile-stage.feature +++ b/features/profile-stage.feature @@ -13,6 +13,40 @@ Feature: Profile the template render stage Scenario: Profiler loads a table with the correct hooks Given a WP install + When I run `wp profile stage bootstrap --fields=hook` + Then STDOUT should be a table containing rows: + | hook | + | | + | muplugins_loaded | + | | + | plugins_loaded | + | | + | setup_theme | + | | + | after_setup_theme | + | | + | init | + | | + | wp_loaded | + | | + | total | + + When I run `wp profile stage main_query --fields=hook` + Then STDOUT should be a table containing rows: + | hook | + | | + | parse_request | + | | + | send_headers | + | | + | pre_get_posts | + | | + | the_posts | + | | + | wp | + | | + | total | + When I run `wp profile stage template --fields=hook` Then STDOUT should be a table containing rows: | hook |