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
Tests should not depend on external commands #4673
Comments
Thanks @kirtangajjar . Not 100% sold on the philosophical argument but these are poor tests as they're never run on the phar so should have been fixed with #4597. Will refactor as behat tests. |
The main issue here is that you cannot run the "unit tests that are supposed to test the framework" without including the hidden dependency of the bundled command. So not only are they not "unit" tests (which, I know, is something WordPress does not really care about at all), but they also break when you just want to test your "package" in isolation. |
Well I find the whole bundled versus framework division artificial. But that should be part of the Great Package Debate following on from the last office hours... |
That division is not so artificial. I had to build a Composer plugin that splits 1 autoloader setup into two, just to make it work... |
@gitlost The thing is |
testRunMysqlCommandProcDisabled
,testLaunchEditorForInputProcDisabled
andtestGetTempDir
intest-utils.php
andtestLaunchProcDisabled
intest-ee.php
depends oneval-command
.This shouldn't be the case. If they have to, It's better to move such tests in a separate file(as it's done with
test-bundled-commands.php
)The text was updated successfully, but these errors were encountered: