edcs
edcs

Reputation: 3879

New Line After Each PHPUnit Test

I've got a test suite setup on a Laravel project which uses PHPUnit. Usually the dots which indicate whether the test has passed or not are shown on the same line, however in this project each dot is separated with a new line:

enter image description here

I've searched through all my tests to see if something is echoing an \n or a PHP_EOL but can't see anything, I've tried different versions of PHPUnit and I've tried starting over with a totally new test suite. None of these attempts have fixed the problem! The configuration in phpunit.xml for this test suite is identical to other projects too.

Can anyone suggest anything else I could do to fix this?

Upvotes: 6

Views: 1792

Answers (2)

meekgeek
meekgeek

Reputation: 66

For me it was a space before the opening <?php tag in one of my files.

Upvotes: 5

gontrollez
gontrollez

Reputation: 6538

The output can come from the actual php files being tested. Aside from obvious echo sentences that can be executed during the test, it can be caused by files with the closing ?> tag that have a newline character afterwards. If this is the case I'd suggest getting rid of the closing ?> tags as they bring nothing useful.

Upvotes: 2

Related Questions