Problem/Motivation

To me, it was totally not obvious that one should copy core/phpunit.xml.dist to core/phpunit.xml and then modify it.

I asked dawehner how he dealt with phpunit.xml.dist not being listed in Drupal core's .gitignore, and the annoyances that come with that. His response: you haven't read the blogpost from alex, didnt' you?. In which he was referring to https://www.chapterthree.com/blog/javascript-testing-comes-to-drupal-8.

I had read that blog post, but I read copy phpunit.xml.dist to phpunit.xml.dist, so I simply didn't notice. Also, that's not widely-known/easily-found documentation, it's just a blog post. (But a great blog post!)

Proposed resolution

  1. Document it in core/phpunit.xml.dist
  2. Document it in core/README.md

Remaining tasks

Review.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Title: Document that core/phpunit.xml.dist should be modified & copied to core/phpunit.xml » Document that core/phpunit.xml.dist should be copied to core/phpunit.xml, then modified
Status: Active » Needs review
StatusFileSize
new1.56 KB
dawehner’s picture

Component: base system » phpunit
Status: Needs review » Reviewed & tested by the community

I think its fine to prefer phpunit.xml over environment variables. It makes it easier, IMHO, so removing it from here is a good idea.

anavarre’s picture

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 2758357-2.patch, failed testing.

The last submitted patch, 2: 2758357-2.patch, failed testing.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Version: 8.9.x-dev » 9.3.x-dev
Status: Needs work » Needs review
StatusFileSize
new550 bytes

1) I think the first point in the proposed resolution is covered now, the README.md in core/tests has instructions for phpunit.xml.dist
2) For 2, how about just refer to the README? I have made a patch for that. No interdiff because this and the earlier patch are small.

guilhermevp’s picture

Status: Needs review » Reviewed & tested by the community

I think that this is enough to point the user in the right direction, but yes, this is very useful instruction.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/phpunit.xml.dist
@@ -1,5 +1,9 @@
+<!--
+ This is an example file. See core/tests/README.md for use instructions.
+-->

Unfortunately this is not quite true. This file is used by DrupalCI to run all PHPUnit tests. I think this should say something more along the lines of "For best practices on customising PHPUnit configuration see core/tests/README.md." or something like that.

guilhermevp’s picture

Status: Needs work » Needs review
StatusFileSize
new584 bytes

Made changes following #16 feedback. Please review.

quietone’s picture

Status: Needs review » Needs work

Needs to be wrapped at 80 columns.

guilhermevp’s picture

Sorry @quietone, the parte the belongs to the patch is respecting the columns... Should I change the rest of the comment?

quietone’s picture

When I wrap that for 80 columns it becomes

<!--
 For best practices on customizing PHPUnit configuration see
 core/tests/README.md for use instructions.
-->

But then I thought it might be nice to get this to one line. What about one of these? Sorry for not thinking of options earlier. I must take more walks!

<!--
 For how to customize PHPUnit configuration see core/tests/README.md.
-->

or even
<!-- For how to customize PHPUnit configuration see core/tests/README.md. -->

longwave’s picture

"To customize PHPUnit configuration, please see core/tests/README.md"?

quietone’s picture

I know it is for user interface text, but this says not to use 'please'. Maybe not use 'please' here as well.

guilhermevp’s picture

Status: Needs work » Needs review
StatusFileSize
new543 bytes

Used the second suggestion in comment #20, please review!

daffie’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 3a5c113 and pushed to 9.3.x. Thanks!

  • alexpott committed 3a5c113 on 9.3.x
    Issue #2758357 by guilhermevp, quietone, Wim Leers, longwave, dawehner,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.