File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,55 @@ Feature: Display database size
30
30
wp_cli_test
31
31
"""
32
32
33
+ Scenario : Display only database size in a human readable format for a WordPress install
34
+ Given a WP install
35
+
36
+ When I run `wp db size --human-readable`
37
+ Then STDOUT should contain:
38
+ """
39
+ wp_cli_test
40
+ """
41
+
42
+ And STDOUT should contain:
43
+ """
44
+ KB
45
+ """
46
+
47
+ When I try `wp db size --human-readable --size_format=b`
48
+ Then the return code should not be 0
49
+ And STDERR should contain:
50
+ """
51
+ Cannot use --size_format and --human-readable arguments at the same time.
52
+ """
53
+ And STDOUT should be empty
54
+
55
+ Scenario : Display only table sizes in a human readable format for a WordPress install
56
+ Given a WP install
57
+
58
+ When I run `wp db size --tables --human-readable`
59
+ Then STDOUT should contain:
60
+ """
61
+ wp_posts
62
+ """
63
+
64
+ And STDOUT should contain:
65
+ """
66
+ KB
67
+ """
68
+
69
+ But STDOUT should not contain:
70
+ """
71
+ wp_cli_test
72
+ """
73
+
74
+ When I try `wp db size --tables --human-readable --size_format=b`
75
+ Then the return code should not be 0
76
+ And STDERR should contain:
77
+ """
78
+ Cannot use --size_format and --human-readable arguments at the same time.
79
+ """
80
+ And STDOUT should be empty
81
+
33
82
Scenario : Display only database size in bytes for a WordPress install
34
83
Given a WP install
35
84
You can’t perform that action at this time.
0 commit comments