We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 071cb94 commit 9e5aa60Copy full SHA for 9e5aa60
1 file changed
features/profile-queries.feature
@@ -3,12 +3,33 @@ Feature: Profile database queries
3
@require-wp-4.0
4
Scenario: Show all database queries
5
Given a WP install
6
+ And a wp-content/mu-plugins/test-queries.php file:
7
+ """
8
+ <?php
9
+ add_action( 'init', function() {
10
+ global $wpdb;
11
+ $wpdb->query( "SELECT 1 as test_query_one" );
12
+ $wpdb->query( "SELECT 2 as test_query_two" );
13
+ });
14
15
- When I run `wp profile queries --fields=time`
16
+ When I run `wp profile queries --fields=query,time`
17
Then STDOUT should contain:
18
19
+ query
20
21
+ And STDOUT should contain:
22
"""
23
time
24
25
26
27
+ SELECT 1 as test_query_one
28
29
30
31
+ SELECT 2 as test_query_two
32
33
And STDOUT should contain:
34
35
total
0 commit comments