-
Notifications
You must be signed in to change notification settings - Fork 396
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
Allow PHPUnit to bootstrap from core. #3007
Conversation
@danepowell FYI we CAN bootstrap from core right now using the config key in the phpunit options in blt.yml. See #1435. I'm not sure if this is significantly different than what you are trying to do? but you should be able to do this and bootstrap core without any code changes today:
|
If the config approach solves the issue of being able to bootstrap and run the tests, then the question is more about maintainability and if we should be trying to run a custom bootstrap.php. My default stance is to remove what we don't actually need, but I don't have strong feeling about it in this case. @danepowell I assume you're advocating for removing it. @mikemadison13 are you advocating for keeping it? |
* Update local-development.md to reference committing DrupalVM files.
I tested this by applying this patch and adding the following lines to my
Running those, I get successful runs of the views tests:
Caveat I had to make sure I was on 9.x-dev and where the |
* Adding replication and verification step sections and clean up formatting. * Adding new guidelines for PRs to the CONTRIBUTING docs.
… tag to source repo. (acquia#2992) * Adding a cutSourceTag method and invoking when deploying tag. * Set default deploy.tag_source config setting and check it when deploying. * Refactoring to use a single cutTag method. * Remove line about expectation you already have a tag on your source before you tag a release. * Warn if user is creating a tag but tag_source option is false. * Updating deploy documentation.
It looks like updating the PR pulled in some extraneous commits 😢 |
Closing in favor of #3071, which just cherry-picks the meaningful bit of this PR into the 9.2.x branch. |
As part of #2982, we created our own PHPUnit
bootstrap.php
file in order to support multiple versions of PHPUnit.This created a bit of a problem for folks testing Drupal core and modules. Because BLT forces you to use that bootstrap file, you can't use core's own
bootstrap.php
, and thus if you try to run a PHPUnit test according to the BLT docs you'll end up with errors like this:I see a few ways to tackle this problem. In general, I question the wisdom in trying to maintain our own copy of
bootstrap.php
. Why not just use core's? And why not simply delegate the choice of which bootstrap file to use tophpunit.xml
?This PR takes a middle road by just removing the CLI argument forcing you to use BLT's bootstrap file. But I'd love to hear additional arguments for or against removing our custom bootstrap file altogether, and just use core's instead.