Will php being out of memory caused by increasing memory leak of php itself ?
If not, and zend_gc = On ...
Why we can face out of memory siutation when running phpunit ?
I believe the default PHP memory limit is often only 128Mb, have you tried increasing this, or setting it to -1 to remove the limit?
In php.ini, you need to change:
memory_limit = 128M ;