-
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 Tests to Bootstrap Drupal #1048
Comments
I have temporarily solved this issue by adding a custom phing target to my project, and executing the tests (in the module directory) with a custom exec script inside of the phpunit target.
|
This ticket is related to, but not identical to #1047 |
Note that my work around for this no longer works (above) as the phing target for phpunit tests is no longer present in BLT 8.8.x |
Resolved by #1047 |
Currently PHPUnit doesn't include any references to Drupal (specifically, no bootstrap, and no reference to the Drupal config file at ${docroot}/core/phpunit.xml.dist).
It would be ideal if BLT had some method of allowing PHPUnit tests to include this parameter, as it is possible to have tests that are perfectly valid WITH this parameter that will FAIL without.
Note that I have attempted to modify the phing call https://github.com/acquia/blt/blob/8.x/phing/tasks/tests.xml#L243 per the parameters specific at https://www.phing.info/docs/guide/trunk/PHPUnitTask.html (see configuration) but it doesn't seem to actually load that configuration file.
<phpunit configuration="${docroot}/core/phpunit.xml.dist" printsummary="true" failureproperty="phpunit.failures" errorproperty="phpunit.errors">
Unclear if this is a bug in phing itself or something wrong with BLT. I have attempted this with the file renamed to just be .xml (no luck). I've also attempted to pass a bootstrap parameter (instead of the configuration parameter) and that also appears to be non-functional.
The text was updated successfully, but these errors were encountered: