-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support 'wporg_status' and 'wporg_last_updated' as optional `wp plugi…
…n list` fields (#382) * Plugins show their .org status. * Split the fields to check for wporg and date seperatatly. * Temp behat file to check * Added hints for behat that need to be implemented. * phpcs fixes. * Also add wp-org checks to mu-plugins. * Added behat tests. * Allow to select the status on wporg as a single field. * Added Behat tests. * Better check for active plugins. * Renamed wporg keys * Replaced the api.wp call with the appropriate class. * replaced test plugin Akismet, because it's failing php version tests. * Fixed a missed rename. * Dropins need a hardcoded exception for wp.org status. * Removed all no_wp_org key words. * Fix the feature name in Behat * Add an example to the command doc * Regenerate README --------- Co-authored-by: Daniel Bachhuber <[email protected]>
- Loading branch information
1 parent
506a20a
commit 12618c7
Showing
3 changed files
with
187 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Feature: Check the status of plugins on WordPress.org | ||
|
||
@require-wp-5.2 | ||
Scenario: Install plugins and check the status on wp.org. | ||
Given a WP install | ||
|
||
When I run `wp plugin install wordpress-importer --version=0.5 --force` | ||
And I run `wp plugin install https://downloads.wordpress.org/plugin/no-longer-in-directory.1.0.62.zip` | ||
And a wp-content/plugins/never-wporg/never-wporg.php file: | ||
""" | ||
<?php | ||
/** | ||
* Plugin Name: This plugin was never in the WordPress.org plugin directory | ||
* Version: 2.0.2 | ||
*/ | ||
""" | ||
|
||
When I run `wp plugin list --name=wordpress-importer --field=wporg_last_updated` | ||
Then STDOUT should not be empty | ||
And save STDOUT as {COMMIT_DATE} | ||
|
||
When I run `wp plugin list --fields=name,wporg_status` | ||
Then STDOUT should be a table containing rows: | ||
| name | wporg_status | | ||
| wordpress-importer | active | | ||
| no-longer-in-directory | closed | | ||
| never-wporg | | | ||
|
||
When I run `wp plugin list --fields=name,wporg_last_updated` | ||
Then STDOUT should be a table containing rows: | ||
| name | wporg_last_updated | | ||
| wordpress-importer | {COMMIT_DATE} | | ||
| no-longer-in-directory | 2017-11-13 | | ||
| never-wporg | | | ||
|
||
When I run `wp plugin list --fields=name,wporg_status,wporg_last_updated` | ||
Then STDOUT should be a table containing rows: | ||
| name | wporg_status | wporg_last_updated | | ||
| wordpress-importer | active | {COMMIT_DATE} | | ||
| no-longer-in-directory | closed | 2017-11-13 | | ||
| never-wporg | | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters