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
Newer PHPUnit versions don't allow for non-existing directories in testsuites #65
Comments
Ping @fooman @sprankhub |
Is it just the directories that need to exist, or do they each need to contain files? Perhaps a |
I think we should be able to adjust this on the fly to make this useful across a range of different ways of adding tests. Just created a PR #66 which should loop over whatever we supply in phpunit.xml and remove any entries which don't exist. |
The solution works for me. +1 for closing this. In the mean time I'm also copying the same solution to unit tests as well. |
In the
phpunit.xml
file shipped with the ExtDN Integration Tests, there are multiple different directories mentioned for the testsuite. In my personal case, the first folder matches my tests. The other ones are simply included "just in case".Unfortunately, newer versions of PHPUnit (todo: which ones? well, newer ones, at least with Magento 2.4.4 under PHP 8.1) give a failure when one of these folders is missing. My solution is now to use the
PHPUNIT_FILE
input or env variables to bring in a new PHUnit file where I remove all non-relevant files. But this is getting annoying.One possible (breaking) fix would be to let go of the testsuites entirely, simply passing the sources to PHPUnit as an argument. In
entrypoint.sh
this would change the following last line:to:
Another fix would be to remove all lines except the top one. but this would break at least the workflow of @fooman .
Yet another fix would be to make it simpler to override the PHPUnit file. Instead of requiring the PHPUnit variable to be defined in your workflow, we could simply check for a relevant file in the
.github/workflows/
folder. But that sounds a bit too magical for me.The text was updated successfully, but these errors were encountered: