Skip to content

Commit 98a00d8

Browse files
committed
Add test requirements
1 parent b64ff53 commit 98a00d8

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

features/profile-hook.feature

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Feature: Profile a specific hook
22

3+
@require-wp-4.0
34
Scenario: Profile all hooks when a specific hook isn't specified
45
Given a WP install
56

@@ -11,6 +12,7 @@ Feature: Profile a specific hook
1112
| template_redirect |
1213
And STDERR should be empty
1314

15+
@require-wp-4.4
1416
Scenario: Profile all callbacks when --all flag is used
1517
Given a WP install
1618

@@ -21,7 +23,7 @@ Feature: Profile a specific hook
2123
| smilies_init() | 2 | 0 |
2224
| feed_links() | 8 | 0 |
2325

24-
@less-than-php-7
26+
@less-than-php-7 @require-wp-4.0
2527
Scenario: Profile an intermediate stage hook
2628
Given a WP install
2729

@@ -35,6 +37,7 @@ Feature: Profile a specific hook
3537
runcommand\Profile\Profiler->wp_tick_profile_begin()
3638
"""
3739

40+
@require-wp-4.0
3841
Scenario: Profile a hook before the template is loaded
3942
Given a WP install
4043

@@ -43,6 +46,7 @@ Feature: Profile a specific hook
4346
| callback |
4447
And STDERR should be empty
4548

49+
@require-wp-4.0
4650
Scenario: Profile a hook without any callbacks
4751
Given a WP install
4852

@@ -52,6 +56,7 @@ Feature: Profile a specific hook
5256
| total (0) |
5357
And STDERR should be empty
5458

59+
@require-wp-4.0
5560
Scenario: Profile a hook that has actions with output
5661
Given a WP install
5762

@@ -63,6 +68,7 @@ Feature: Profile a specific hook
6368
<meta name="generator"
6469
"""
6570

71+
@require-wp-4.0
6672
Scenario: Profile the shutdown hook
6773
Given a WP install
6874
And a wp-content/mu-plugins/shutdown.php file:
@@ -82,6 +88,7 @@ Feature: Profile a specific hook
8288
| total (2) | 0 | 1 |
8389
And STDERR should be empty
8490

91+
@require-wp-4.0
8592
Scenario: Indicate where a callback is defined with profiling a hook
8693
Given a WP install
8794
And a wp-content/mu-plugins/custom-action.php file:
@@ -101,6 +108,7 @@ Feature: Profile a specific hook
101108
| total (1) | | 0 | 1 |
102109
And STDERR should be empty
103110

111+
@require-wp-4.4
104112
Scenario: Hooks should only be called once
105113
Given a WP install
106114
And a wp-content/mu-plugins/action-test.php file:
@@ -122,7 +130,7 @@ Feature: Profile a specific hook
122130
Warning: Called 1
123131
"""
124132

125-
@less-than-php-7
133+
@less-than-php-7 @require-wp-4.0
126134
Scenario: Profile the mu_plugins:before hook
127135
Given a WP install
128136
And a wp-content/mu-plugins/awesome-file.php file:
@@ -140,7 +148,7 @@ Feature: Profile a specific hook
140148
wp-content/mu-plugins/awesome-file.php
141149
"""
142150

143-
@less-than-php-7
151+
@less-than-php-7 @require-wp-4.0
144152
Scenario: Profile the :after hooks
145153
Given a WP install
146154

features/profile-stage.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Feature: Profile the template render stage
22

3+
@require-wp-4.0
34
Scenario: Profiler loads a summary table
45
Given a WP install
56

@@ -10,6 +11,7 @@ Feature: Profile the template render stage
1011
| main_query |
1112
| template |
1213

14+
@require-wp-4.0
1315
Scenario: Profiler loads a table with the correct hooks
1416
Given a WP install
1517

@@ -79,6 +81,7 @@ Feature: Profile the template render stage
7981
| loop_end:before |
8082
| loop_end |
8183

84+
@require-wp-4.0
8285
Scenario: Use --all flag to profile all stages
8386
Given a WP install
8487

@@ -131,6 +134,7 @@ Feature: Profile the template render stage
131134
Error: Invalid stage. Must be one of bootstrap, main_query, template, or use --all.
132135
"""
133136

137+
@require-wp-4.0
134138
Scenario: Identify callback_count for each hook
135139
Given a WP install
136140

@@ -139,6 +143,7 @@ Feature: Profile the template render stage
139143
| hook | callback_count |
140144
| muplugins_loaded | 2 |
141145

146+
@require-wp-4.0
142147
Scenario: Use spotlight mode to filter out the zero-ish values
143148
Given a WP install
144149

features/profile.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Feature: Basic profile usage
3333
Error: 'SAVEQUERIES' is defined as false, and must be true. Please check your wp-config.php
3434
"""
3535
36+
@require-wp-4.0
3637
Scenario: Profile a hook without any callbacks
3738
Given a WP install
3839
@@ -42,6 +43,7 @@ Feature: Basic profile usage
4243
| total (0) | |
4344
And STDERR should be empty
4445
46+
@require-wp-4.0
4547
Scenario: Trailingslash provided URL to avoid canonical redirect
4648
Given a WP install
4749

0 commit comments

Comments
 (0)