Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.
You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page
Unit tests are powered by PHPUnit. They test one and only one PHP class, mocking/stubbing any dependencies that class might have.
This Unit
folder meets some rules:
If there is a hard-coded dependency such as a singleton pattern being used or a static call, this class cannot be unit tested and should be tested using integration tests.
We use the following stack:
camelCase
names for test function names.testGetPrice
(no idea what such a test is supposed to do)testDiscountIsAppliedToFinalPrice