-
Notifications
You must be signed in to change notification settings - Fork 75
Add feature tests for checking plugin with addon enabled #518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
8b6abd0
697526f
8bc5c7b
06a018d
7f43fdc
4139c9d
a5df7a7
82dc502
9c8e5cb
dd7e4ba
3b24b72
92dabcb
f37a830
3d7d8a3
82cc334
0fbf653
dd7827b
90db569
56eb443
b30b02f
16f1b31
2a8a2a8
714b53a
c07dc62
2ce4dea
9487cfe
10b39a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,17 @@ | |
|
||
// Create the CLI command instance and add to WP CLI. | ||
$plugin_command = new Plugin_Check_Command( $context ); | ||
WP_CLI::add_command( 'plugin', $plugin_command ); | ||
|
||
WP_CLI::add_command( | ||
'plugin', | ||
$plugin_command, | ||
array( | ||
'after_invoke' => function () { | ||
if ( file_exists( ABSPATH . 'wp-content/object-cache.php' ) ) { | ||
unlink( ABSPATH . 'wp-content/object-cache.php' ); | ||
swissspidy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That sounds too easy to be true 😅 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yah, looks like it does not work :-D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But tests are passing in GH Action. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. The "Perform runtime check for multi-file plugin" scenario is also failing locally. When I manually go to the temp directory for that WP install and run the CLI command, the runtime checks are indeed not running. The drop-in is successfully copied though. So something is definitely not right 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you point me to where in the Behat tests the failing call is defined? I'm not familiar with Behat at all, so not sure whether I'm looking at the right place. Is it the second There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. First command run good. When same command run again, issue appears. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. Can you also clarify how that relates to runtime checks? As far as I can tell, the addon checks are all non-runtime checks, so what does that have to do with runtime checks / setting up the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If that file is deleted manually then above issue does not appear. This is not specific to runtime checks. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But isn't that file only created after the failing second run, in https://github.com/WordPress/plugin-check/pull/518/files#diff-303aba0b6bdf4d673c51a01f6bb7b91eccfc4717908349148e02927f9f3ac223R672? Since only there the |
||
}, | ||
) | ||
); | ||
|
||
/** | ||
* Adds hook to set up the object-cache.php drop-in file. | ||
|
Uh oh!
There was an error while loading. Please reload this page.