Code of the Loki Checkout is tested in various ways:
Unit tests are focused on specific methods and classes with little dependencies. Unit tests are meant to be run within an instance of Magento, which for instance gives the benefit of autoloading classes in app/code
, but without depending the dev/tests/unit/
folder (which also means that the testing framework its ObjectManager is not used).
Typically, unit tests can be run by using the following CLI:
vendor/bin/phpunit vendor/yireo/magento2-loki-checkout/Test/Unit/
As soon as the complexity of a unit goes up, an integration test is preferred instead.
Coming soon