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.sh downloads wp-cli-nightly.php from GitHub, for use in the test suite: https://github.com/wp-cli/cron-command/blob/master/bin/install-package-tests.sh#L21
wp-cli-nightly.php includes a copy of class Cron_Command from the point at which the Phar package was built.
- Because the nightly's copy of
class Cron_Command is autoloaded before the package repository's copy, the test suite is run against wp 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.
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.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_Commandis registered over the nightly's copy.Open to all sorts of creative ideas for how we should address this issue.