Home > Back-end >  Memory exhausted while running phpunit
Memory exhausted while running phpunit

Time:10-21

I'm using pest PHP testing framework for unit testing in laravel. Memory is getting exhausted each time when my test cases are run. How can I increase my memory limit for test cases? Below I'm attaching a screenshot of my terminal output enter image description here

CodePudding user response:

You can increase the memory of PHP, but depending on how many tests you have, you should look into if you have memory leaks or data being kept in memory that should not.

php -d memory_limit=2048M ./vendor/bin/phpunit
  • Related