I have suddenly the same issue. It has worked flawlessly for months.
Jun 4, 2015
18
Level 26
Laravel 5 PHPUnit Memory Allocation Exhausted
I have a large testing suite for our API built in Laravel. We just moved our code to the latest build of Laravel (from a pre 5.0 version) to get ready for the 5.1 release and the unit tests are now failing due to a memory allocation problem.
The memory allocation problem does not occur when running each tests class separately (not running the comprehensive test suite).
Has anyone ever dealt with something similar before? How did you all fix it.
vagrant@homestead:~/www/api.lawnstarter$ ./vendor/bin/phpunit
PHPUnit 4.8-dev by Sebastian Bergmann and contributors.
.................................................I............. 63 / 929 ( 6%)
............................................................... 126 / 929 ( 13%)
............................................................... 189 / 929 ( 20%)
...........................FFF................................. 252 / 929 ( 27%)
.............PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 53 bytes) in /home/vagrant/www/api.lawnstarter/vendor/routes.php on line 15
PHP Stack trace:
PHP 1. {main}() /home/vagrant/www/api.lawnstarter/vendor/phpunit/phpunit/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /home/vagrant/www/api.lawnstarter/vendor/phpunit/phpunit/phpunit:36
PHP 3. PHPUnit_TextUI_Command->run() /home/vagrant/www/api.lawnstarter/vendor/phpunit/phpunit/src/TextUI/Command.php:106
PHP 4. PHPUnit_TextUI_TestRunner->doRun() /home/vagrant/www/api.lawnstarter/vendor/phpunit/phpunit/src/TextUI/Command.php:154
PHP 5. PHPUnit_Framework_TestSuite->run() /home/vagrant/www/api.lawnstarter/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:438
PHP 6. PHPUnit_Framework_TestSuite->run() /home/vagrant/www/api.lawnstarter/vendor/phpunit/phpunit/src/Framework/TestSuite.php:731
PHP 7. PHPUnit_Framework_TestCase->run() /home/vagrant/www/api.lawnstarter/vendor/phpunit/phpunit/src/Framework/TestSuite.php:731
PHP 8. PHPUnit_Framework_TestResult->run() /home/vagrant/www/api.lawnstarter/vendor/phpunit/phpunit/src/Framework/TestCase.php:699
PHP 9. PHPUnit_Framework_TestCase->runBare() /home/vagrant/www/api.lawnstarter/vendor/phpunit/phpunit/src/Framework/TestResult.php:610
PHP 10. APIv1TestCase->setUp() /home/vagrant/www/api.lawnstarter/vendor/phpunit/phpunit/src/Framework/TestCase.php:739
Please or to participate in this conversation.