O'Reilly logo

Magento Extensions Development by Jérémie Bouchet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing in Magento

We are going straight to the core of testing in Magento! Let's see how it is done.

How Magento integrates PHPUnit

Magento offers PHPUnit as a feature for your unit testing development. This tool is a programmer-oriented testing framework based on the xUnit architecture for unit testing frameworks. Magento installed PHPUnit with a composer in [magento_root]/vendor/phpunit, so you don't have to install PHPUnit yourself.

All of the data tests are located in [magento_root]/dev/tests, so Magento placed a phpunit.xml file configuration for each type of test.

These configuration files are used by PHPUnit to know how to run each test. For unit tests, the configuration file is located in [magento_root]/dev/tests/unit.

Open the [magento_root]/dev/tests/unit/phpunit.xml ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required