In trying to work around the "headers already sent" problem, I'm using --stderr to get my tests to pass. Unfortunately, using --stderr seems to disable the --debug flag I'm also passing to see the details of which tests are running at a given point.
I couldn't find any mention that these flags were incompatible -- are they? If so, should the help be updated? If they should be compatible, perhaps this is a bug then?
Thanks for your help,
Yeah. Using --stderr doesn't honor --debug the way it's implemented.
To try if it solves your problem you can edit TextUI/Command.php:420 and add the debug flag there
isset($this->arguments['verbose']) ? $this->arguments['verbose'] : FALSE , false, true
Making the result printer honor --color and --stderr would just mean moving the argument handing out of the big arg processing loop.
@sebastianbergmann I've 'polluted' the arguments array with this. I don't think this is an issue but if it is tell me and I'll pull the flag out into a simple variable
In version 4.1.4, it seems to honour --stderr in the command line but not the config 'stderr="true"'.
@edorian I am seeing the same thing as @silverbadge in 4.3.5. My stderr="true" is in my XML config. Using --debug on the command does not show the test names as hoped.
@silverbadge 's situation got me too. --stderr and --debug seems ok, but stderr in the xml config silences debug. This behaviour seems inconsistent.
@edorian perhaps we should consider reopening this?
Which version are you using @euoia? A lot of things changed since 302b465, maybe this bug got back before ea1fea3.
Ps.: When/if #1550 get merged we can create PHPT tests to avoid this behaviour come back.
PHPUnit 4.4.1 by Sebastian Bergmann.
@henriquemoody @euoia I think the original issue only concerned the CLI options. Feel free to open a new issue, though.