Skip to content

Instantly share code, notes, and snippets.

@birchestx
Created January 11, 2015 17:14
Show Gist options
  • Save birchestx/a7f94df991a8fd3536b2 to your computer and use it in GitHub Desktop.
Save birchestx/a7f94df991a8fd3536b2 to your computer and use it in GitHub Desktop.
Running Magento2 Unit tests
Firstly you need to ensure you have enough memory allocated else the script will fall over.
Edit php.ini and I found that setting memory_limit to 1028M was enough (default is 128M).
If you want to find your php.ini then you can look at phpinfo.php, or do:
php -i | grep php.ini
To run the tests goto base root folder and type:
./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist
I found this ran 11329 tests in < 3 minutes and had 31 errors
@mzeis
Copy link

mzeis commented Jan 18, 2015

If you disable the caches the test suite is only marginally slower (for me still 3.06 minutes) and you won't get the errors (that's how it was for me).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment