@@ -297,6 +297,7 @@ Feature: Manage WordPress plugins
297297 """
298298 And the return code should be 0
299299
300+ @require-mysql
300301 Scenario : List plugins
301302 Given a WP install
302303
@@ -317,6 +318,30 @@ Feature: Manage WordPress plugins
317318 Automattic
318319 """
319320
321+ @require-sqlite
322+ Scenario : List plugins
323+ Given a WP install
324+
325+ When I run `wp plugin activate akismet hello`
326+ Then STDOUT should not be empty
327+
328+ When I run `wp plugin list --status=inactive --field=name`
329+ Then STDOUT should contain:
330+ """
331+ sqlite-database-integration
332+ """
333+
334+ When I run `wp plugin list --status=active --fields=name,status,file`
335+ Then STDOUT should be a table containing rows:
336+ | name | status | file |
337+ | akismet | active | akismet /akismet .php |
338+
339+ When I run `wp plugin list --status=active --field=author`
340+ Then STDOUT should contain:
341+ """
342+ Automattic
343+ """
344+
320345 Scenario : List plugin by multiple statuses
321346 Given a WP multisite install
322347 And a wp-content/plugins/network-only.php file:
@@ -373,6 +398,9 @@ Feature: Manage WordPress plugins
373398 | name | status | update |
374399 | wordpress -importer | inactive | none |
375400
401+ # Disabled for SQLite because this tests a scenario with an empty plugins directory,
402+ # so the SQLite integration plugin would be missing.
403+ @require-mysql
376404 Scenario : Install a plugin when directory doesn't yet exist
377405 Given a WP install
378406
@@ -400,15 +428,20 @@ Feature: Manage WordPress plugins
400428 Scenario : Enable and disable all plugins
401429 Given a WP install
402430
403- When I run `wp plugin activate --all`
431+ When I run `wp plugin list --format=count`
432+ Then save STDOUT as {PLUGIN_COUNT}
433+
434+ # Uses "try" because the SQLite plugin attempts to do a redirect.
435+ # See https://github.com/WordPress/sqlite-database-integration/issues/49
436+ When I try `wp plugin activate --all`
404437 Then STDOUT should be:
405438 """
406439 Plugin 'akismet' activated.
407440 Plugin 'hello' activated.
408- Success: Activated 2 of 2 plugins.
441+ Success: Activated {PLUGIN_COUNT} of {PLUGIN_COUNT} plugins.
409442 """
410443
411- When I run `wp plugin activate --all`
444+ When I try `wp plugin activate --all`
412445 Then STDOUT should be:
413446 """
414447 Success: Plugins already activated.
@@ -619,7 +652,9 @@ Feature: Manage WordPress plugins
619652 | name | title | description | file |
620653 | db -error .php | | Custom database error message . | db -error .php |
621654
622- @require-wp-4.0
655+ # Disabled for SQLite because this test uninstalls all plugins,
656+ # including the SQLite integration plugin.
657+ @require-wp-4.0 @require-mysql
623658 Scenario : Validate installed plugin's version.
624659 Given a WP installation
625660 And I run `wp plugin uninstall --all`
0 commit comments