Magento, Docker, PHPUnit

Magento, Docker, PHPUnit

As I have written before, we are big fans of Mark Shust's Docker Configuration for Magento project. It comes with quite some useful tools installed out of the box. However, I was missing one: Being able to run PHPUnit from the host environment.

To solve this problem, I added a shell script called bin/phpunit to our code repository that looks like this:

#!/bin/bash
bin/cli /var/www/html/vendor/bin/phpunit \
-c /var/www/html/dev/tests/unit/phpunit.xml.dist \
/var/www/html/app/code/


Next up I needed to make the bash script executable:

chmod +x bin/phpunit


Now I can invoke phpunit from the host by running the following command:

./bin/phpunit


Eintrag von Stephan Hochdörfer am 17.06.2020

Diese Webseite verwendet Cookies, um die Bedienfreundlichkeit zu erhöhen. Mit der Nutzung unserer Webseite wird das Einverständnis erklärt, dass wir Cookies verwenden. Weitere Informationen.