How to prevent the use of ObjectManagaer in the Unit test Magento 2?

Magento 2 with the Unit test for a module, Avoid direct use of Helper\ObjectManager in a Unit test.

Many developers used the native Magento\Framework\TestFramework\Unit\Helper\ObjectManager class for creating mock and objects. Continue reading “How to prevent the use of ObjectManagaer in the Unit test Magento 2?”

Magento 2: Get Product collection filter using Service contract.

When you are looking for product collection filter in Magento 2, First thing in your mind come to go with ProductFactory approach.

With ProductFactory way, When you do use a Collection, use a Factory class to instantiate the Collection, as the getCollection() method is deprecated. Continue reading “Magento 2: Get Product collection filter using Service contract.”