mercadopago/magento2-plugin 3.14.0

Mercado Pago Magento 2 Plugin

Type

magento2-module

License

OSL-3.0, AFL-3.0

Requires
Requires (dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MercadoPago

Magento 2 - Mercado Pago Module (v3.14.0)

The Mercado Pago plugin for Magento 2 allows you to expand the functionalities of your online store and offer a unique payment experience for your customers.

Documentation in English

For a better experience, you will be redirected to our site by clicking on the links below:

Documentación en Español

Para una mejor experiencia, será redirigido a nuestro sitio haciendo clic en los links a abajo:

Documentação em Português

Para uma melhor experiência, você será redirecionado para o nosso site, clicando nos links abaixo:

Support

Something's wrong? Get in touch with our support

How to code unit tests

This description is intended to help the developer to run the plugin unit tests

Where to write tests - Test project structure

The plugin is divided into two directories in src:

  • Core : where are the codes for all the functionalities
  • Test/Unit: where are the unit tests

"Test/Unit" mirrors the Core folder, so, if in the Core folder I have a "foo" directory with the file "bar":

Core/foo/bar.php

means that the test folder should look like this (same folder, suffixing the file with "Test"):

Test/Unit/foo/barTest.php

Running tests in development environment

Once this plugin is installed in your development environment with Magento, use the phpUnit that is already installed in magento to run the tests. You can do this by calling phpUnit inside Magento's "vendor" directory and pointing to the plugin's installation location (which will probably be app/code/MercadoPago), for example:

magento/vendor/phpunit/phpunit/phpunit --whitelist magento2/app/code/MercadoPago/Core magento/app/code/MercadoPago/Test
  • magento/vendor/phpunit/phpunit/phpunit: calls phpUnit
  • --whitelist magento2/app/code/MercadoPago/Core: Whitelist for code coverage analysis.
  • --whitelist magento2/app/code/MercadoPago/Test: Directory where phpUnit will find the tests.

Tests on GitHub Actions Workflow

Every time you submit a pull request to this repository, a workflow will be triggered that will run the unit tests. If your unit test fails, you won't be able to merge the pull request.