magento2-configurator icon indicating copy to clipboard operation
magento2-configurator copied to clipboard

Unit Tests run without proper configuration

Open bartoszherba opened this issue 8 years ago • 3 comments

Currently Travis run unit tests without pointing to configuration file (eg. dev/tests/unit/phpunit.xml.dist) which yields in errors with tests execution. Configuration includes bootstrap.php which is required to run tests properly. As a result tests that pass locally do no pass during CI process and so it is not possible to develop any future implementation which includes tests.

Another thing is that sniffers run through tests files but are not configured to do so (eg. it is required to use a lot of static method or to name long descriptive tests method). As a result every tests must include sniffers/phpmd ignore annotation.

bartoszherba avatar Nov 07 '17 10:11 bartoszherba

Hi @bartoszherba,

Once Version 1 (for M2.1) has been released, we'll look to work on Version 2 (for M2.2) as PHPUnit has updated and the test classes will require to also be updated.

Feel free to make any relevant changes to get the sniffers working properly :smile:.

chevli avatar Nov 07 '17 20:11 chevli

@chevli Could you reference PHPUnit changes? I can't find anything in changelog for 2.2.x Thanks in advance.

bartoszherba avatar Nov 08 '17 05:11 bartoszherba

Magento 2.1

https://github.com/magento/magento2/blob/2324274f8b66180b0e1fa7896c369c6a09cae5aa/composer.json#L70

Magento 2.2

https://github.com/magento/magento2/blob/dbcc3c4d57b1e5566cbda92533a03ef5f36d608e/composer.json#L76

chevli avatar Nov 08 '17 13:11 chevli