magento-engcom / import-export-improvements

Open Software License 3.0
31 stars 29 forks source link

Does Magento\CatalogImportExport\Test\Unit\Model\Export\StubProduct need to extend Magento\CatalogImportExport\Model\Export\Product? #129

Closed dmanners closed 5 years ago

dmanners commented 6 years ago

After running PHPStan on the class Magento\CatalogImportExport\Test\Unit\Model\Export\StubProduct I get the following error.

 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   Test/Unit/Model/Export/StubProduct.php
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  13     Magento\CatalogImportExport\Test\Unit\Model\Export\StubProduct::__construct() does not call parent constructor from Magento\CatalogImportExport\Model\Export\Product.
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------

This leads me to the question. Does the stub product need to extend the main product if it does not call the constructor?

I would love someone to do a bit of research into this and see if it is needed and if now suggest how best to refactor this.