1

I'm hosting a project on an Ubuntu virtual machine but am doing all my code editing on Mac OS X, using osxfuse to mount the remote folder from the VM. Because of the filesystem mismatch, OS X is leaving ._* files in my test directories.

Because these files end in *Test.php, PHPUnit executes them, spitting the contents into stdout and obscuring useful debug info with a wall of special characters. In general, PHPUnit doesn't buffer non-test code by default, e.g.:

<?php /* NotATest.php */ ?>
In ur stdout
<?php
echo "killin ur unit... tests";

leads to:

$ phpunit .
In ur stdout
kill ur unit...testsPHPUnit 5.7.5 by Sebastian Bergmann and contributors.

I have seen this question about suppressing output for single test cases, but this level of output buffering would have to happen at a higher level. Similarly, the --disallow-test-output option does nothing because the output is not encapsulated in a test. Is there any way to ignore output produced outside of test methods?

Community
  • 1
  • 1
concat
  • 3,107
  • 16
  • 30
  • How are the files left in there named compared to the actual tests? is there a naming difference? – John Joseph Jan 24 '17 at 13:58
  • @JohnJoseph the difference is always a prepended `._`. E.g. `SampleTest.php` becomes `._SampleTest.php`. – concat Jan 24 '17 at 14:02
  • I wonder then if an exclude pattern path will work in your config file within the testsuites section. Something like ... `/path/to/_*Test.php` (untested) – John Joseph Jan 24 '17 at 14:10
  • @JohnJoseph Wildcard expansion for `` sadly [isn't supported](https://gist.github.com/EvanK/7553935); I also tried to no avail. – concat Jan 24 '17 at 14:24

0 Answers0