|
1 | 1 | Feature: List database tables |
2 | 2 |
|
| 3 | + @require-mysql-or-mariadb |
3 | 4 | Scenario: List database tables on a single WordPress install |
4 | 5 | Given a WP install |
5 | 6 |
|
@@ -35,7 +36,42 @@ Feature: List database tables |
35 | 36 | wp_postmeta,wp_posts |
36 | 37 | """ |
37 | 38 |
|
38 | | - @require-wp-3.9 |
| 39 | + @require-sqlite |
| 40 | + Scenario: List database tables on a single WordPress install |
| 41 | + Given a WP install |
| 42 | + |
| 43 | + When I run `wp db tables` |
| 44 | + Then STDOUT should contain: |
| 45 | + """ |
| 46 | + _mysql_data_types_cache |
| 47 | + wp_users |
| 48 | + sqlite_sequence |
| 49 | + wp_usermeta |
| 50 | + wp_termmeta |
| 51 | + wp_terms |
| 52 | + wp_term_taxonomy |
| 53 | + wp_term_relationships |
| 54 | + wp_commentmeta |
| 55 | + wp_comments |
| 56 | + wp_links |
| 57 | + wp_options |
| 58 | + wp_postmeta |
| 59 | + wp_posts |
| 60 | + """ |
| 61 | + |
| 62 | + When I run `wp db tables --format=csv` |
| 63 | + Then STDOUT should contain: |
| 64 | + """ |
| 65 | + ,wp_commentmeta,wp_comments, |
| 66 | + """ |
| 67 | + |
| 68 | + When I run `wp db tables 'wp_post*' --format=csv` |
| 69 | + Then STDOUT should be: |
| 70 | + """ |
| 71 | + wp_postmeta,wp_posts |
| 72 | + """ |
| 73 | + |
| 74 | + @require-wp-3.9 @require-mysql-or-mariadb |
39 | 75 | Scenario: List database tables on a multisite WordPress install |
40 | 76 | Given a WP multisite install |
41 | 77 |
|
@@ -119,6 +155,86 @@ Feature: List database tables |
119 | 155 | wp_posts |
120 | 156 | """ |
121 | 157 |
|
| 158 | + @require-sqlite |
| 159 | + Scenario: List database tables on a multisite WordPress install |
| 160 | + Given a WP multisite install |
| 161 | + |
| 162 | + When I run `wp db tables` |
| 163 | + Then STDOUT should contain: |
| 164 | + """ |
| 165 | + _mysql_data_types_cache |
| 166 | + wp_users |
| 167 | + sqlite_sequence |
| 168 | + wp_usermeta |
| 169 | + wp_termmeta |
| 170 | + wp_terms |
| 171 | + wp_term_taxonomy |
| 172 | + wp_term_relationships |
| 173 | + wp_commentmeta |
| 174 | + wp_comments |
| 175 | + wp_links |
| 176 | + wp_options |
| 177 | + wp_postmeta |
| 178 | + wp_posts |
| 179 | + wp_blogs |
| 180 | + wp_blogmeta |
| 181 | + wp_registration_log |
| 182 | + wp_site |
| 183 | + wp_sitemeta |
| 184 | + wp_signups |
| 185 | + """ |
| 186 | + |
| 187 | + When I run `wp site create --slug=foo` |
| 188 | + And I run `wp db tables --url=example.com/foo` |
| 189 | + Then STDOUT should contain: |
| 190 | + """ |
| 191 | + wp_users |
| 192 | + """ |
| 193 | + And STDOUT should contain: |
| 194 | + """ |
| 195 | + wp_usermeta |
| 196 | + """ |
| 197 | + And STDOUT should contain: |
| 198 | + """ |
| 199 | + wp_2_posts |
| 200 | + """ |
| 201 | + |
| 202 | + When I run `wp db tables --url=example.com/foo --scope=global` |
| 203 | + Then STDOUT should not contain: |
| 204 | + """ |
| 205 | + wp_2_posts |
| 206 | + """ |
| 207 | + |
| 208 | + When I run `wp db tables --all-tables-with-prefix` |
| 209 | + Then STDOUT should contain: |
| 210 | + """ |
| 211 | + wp_2_posts |
| 212 | + """ |
| 213 | + And STDOUT should contain: |
| 214 | + """ |
| 215 | + wp_posts |
| 216 | + """ |
| 217 | + |
| 218 | + When I run `wp db tables --url=example.com/foo --all-tables-with-prefix` |
| 219 | + Then STDOUT should contain: |
| 220 | + """ |
| 221 | + wp_2_posts |
| 222 | + """ |
| 223 | + And STDOUT should not contain: |
| 224 | + """ |
| 225 | + wp_posts |
| 226 | + """ |
| 227 | + |
| 228 | + When I run `wp db tables --url=example.com/foo --network` |
| 229 | + Then STDOUT should contain: |
| 230 | + """ |
| 231 | + wp_2_posts |
| 232 | + """ |
| 233 | + And STDOUT should contain: |
| 234 | + """ |
| 235 | + wp_posts |
| 236 | + """ |
| 237 | + |
122 | 238 | Scenario: Listing a site's tables should only list that site's tables |
123 | 239 | Given a WP multisite install |
124 | 240 |
|
|
0 commit comments