Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The option to change the printer configuration is printerClass in phpunit config files but --printer on CLI.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#5 | 2811065-3.patch | 668 bytes | webflo |
#2 | 2811065-1.patch | 574 bytes | webflo |
Comments
Comment #2
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedComment #3
tstoecklerhttps://phpunit.de/manual/current/en/textui.html agrees.
Comment #4
klausiRTBC +1
Comment #5
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedFixed line wrapping.
Comment #6
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedDocs are rc eligible
Comment #7
anavarreI'm confused. This was changed in #2760905: The documentation should be more explicit about PHPUnit requesting the webserver user to perform all functional tests (commit)
When I have
--printerClass
, the output is:When I have
--printer
, the output is:FTR the bit of code I'm using in
phpunit.xml
is (either with--printer
or--printerClass
, then):Comment #8
tstoecklerComment #9
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedTested all combinations with cores phpunit (PHPUnit 4.8.11) again. printerClass works in phpunit.xml(.dist). --printer works on CLI.
Comment #10
anavarreSo I think we should clarify that. Committing the patch as is would mean removing a useful reference to
--printerClass
which is exactly what people need to find inphpunit.xml.dist
. I agree it's good to also explain why--printer
needs to be used for the CLI but keeping--printerClass
too would be ideal.Comment #11
anavarreAlso, is this still relevant?
TODO set printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter" once https://youtrack.jetbrains.com/issue/WI-24808 is resolved.
Comment #12
rfay--printerClass is not a valid phpunit option at all. I agree that it *ought to* be. But removing a reference to an invalid option is a *good* thing. Only --printer= should be mentioned, but printerClass= for the phpunit.xml.dist option.
AFAICT, the printerClass definition works, and does not break PHPStorm any more. 2016.3 EAP, October 19, 2016. Here's what I put in there:
Here's the results:
Comment #13
klausiThanks for researching this, so the patch from #5 is correct.
printerClass is still mentioned in phpunit.xml.dist as config option, while --printer should be used on the CLI. The comments in phpunit.xml.dist even explain it sufficiently.
Comment #15
klausiRandom test fail, queued for testing again. Back to RTBC.
Comment #16
alexpottCommitted and pushed 4bbbcd6 to 8.3.x and 8cc46e6 to 8.2.x. Thanks!
It'd be great to open an issue to explore @rfay's finding to see if we can always have the printer on.
Comment #20
jibranCreated #2870145: Set printerClass in phpunit.xml.dist for #16.