I try to run PHPUnit Tests in my new machine and I get this error:
PHP Fatal error: Uncaught exception \'UnexpectedValueException\' with message \'Re
Don't store DirectoryIterator objects for later; you will get an error saying "too many open files" when you store more than the operating system limit (usually 256 or 1024).
For example, this will yield an error if the directory has too many files:
Presumably, this approach is memory intensive as well.
source: http://php.net/manual/pt_BR/directoryiterator.construct.php#87425