This sounds like the output from your phpunit command is getting buffered (either by PHP, the Bash shell, or
grep). There are a couple of ways to unbuffer the output so that it's more responsive.
You could try using the
unbuffer command which is part of
$ unbuffer phpunit tests/cases | grep -v --line-buffered "PHPUnit"
You can try using the
stdbuf command to disable the buffering.
$ stdbuf -i0 -o0 -e0 phpunit tests/cases | grep -v --line-buffered "PHPUnit"
Details of the switches:
adjust standard input stream buffering
adjust standard output stream buffering
adjust standard error stream buffering
So the above sets the buffering for STDIN, STDOUT, STDERR is set to zero.
Grep itself might be the culprit in buffering output. You can tell it to buffer only a line at a time's worth of output. (This one you've already mentioned/discovered but I'm mentioning it so that future viewers of this Q&A will understand that there is buffering there too).
$ phpunit tests/cases | grep -v --line-buffered "PHPUnit"