What is Unit Testing in Magento 2?

Unit Testing Definition:

— UNIT TESTING is a software development process where individual units from a functional(programming) file or components of the software are tested automatically using code level.
— Main Intention for a Unit test is to validate each unit of the software performs as logic designed.
— The unit testing process is completely automatic without any manual testing for functionality.

Continue reading “What is Unit Testing in Magento 2?”

What is the difference between Password and Obscure type in Magento 2?

Password and Obscure both field are the element types used for System.xml file.

1.  Obscure:  You can define Obscure type using type=”obscure”. Hide value to make sure it will not show in HTML.

When you forcefully change the type from Obscure to text using Inspect element still you can’t able to see actual value for an obscure type.

Continue reading “What is the difference between Password and Obscure type in Magento 2?”

How to set Payment additional data in Magento 2?

Magento 2 You can set additional data in payment using setAdditionalData( ) method defined under Quote Module Payment.php class.

Magento\Quote\Model\Quote\Payment class used for set payment related data from quote to order. This class is used for set payment method, additional data, and other payment-related data to Order.

Continue reading “How to set Payment additional data in Magento 2?”