Legacy testing

Legacy tests comprise fragments of libraries that help developers port their modules to a new version of Magento.

We can trigger legacy tests specifically from the root of the Magento installation by using the following command:

php bin/magento dev:tests:run legacy

When this is executed, Magento first internally changes the directory to /dev/tests/static and then executes a command, which is similar to the following one:

php /Users/branko/www/magento2/./vendor/phpunit/phpunit/phpunit testsuite/Magento/Test/Legacy

Once this is triggered, the code runs a check for obsolete access lists, connections, menus, responses, system configuration, and a few other things.

Get Magento 2 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.