PHPUnit – Integration Tests Console Output

When writing integration tests we have special group of slow tests that do a lot of stuff like performing hundreds of downloads or editing thousands of entries. In some cases one of the actions can trigger fatal error and the message would not be specific enough to determine which of those actions broke everything.

Here is a neat trick to enable any test to show console output, it uses fwrite to write to standard I/O stream: Continue reading