-
Notifications
You must be signed in to change notification settings - Fork 1k
Test suite for abstracted command package runs against wrong code #3850
Copy link
Copy link
Closed
Description
Houston, we have a problem.
When a command is abstracted out to a separate package (#3728), its test suite is incorrectly run against the version of the command included in the current WP-CLI nightly build, not the version of the command in the package repository.
To illustrate, here's a PR that should fail its tests, but doesn't: wp-cli/cron-command#3
In this example:
bin/install-wp-tests.shdownloadswp-cli-nightly.phpfrom GitHub, for use in the test suite: https://github.com/wp-cli/cron-command/blob/master/bin/install-package-tests.sh#L21wp-cli-nightly.phpincludes a copy ofclass Cron_Commandfrom the point at which the Phar package was built.- Because the nightly's copy of
class Cron_Commandis autoloaded before the package repository's copy, the test suite is run againstwp cron *present in the nightly build, not that represented by the code in the repository.
The expectation is that the repository's copy of class Cron_Command is registered over the nightly's copy.
Open to all sorts of creative ideas for how we should address this issue.
Reactions are currently unavailable