- stack.md - PrestaShop 1.7.x, PHP, Smarty, SCSS, modules - architecture.md - MVC + hooks, override mechanism, CQRS in src/ - structure.md - Directory layout, key file locations - conventions.md - PHP/Smarty/SCSS/JS conventions, PS patterns - testing.md - No automated tests in custom modules - integrations.md - Allegro, Empik, BaseLinker, shipping, payments - concerns.md - Override fragility, EOL risk, missing CI/CD - db_schema.md - Custom tables, modified core tables Co-Authored-By: Claude <noreply@anthropic.com>
1.9 KiB
1.9 KiB
Testing Patterns
Analysis Date: 2026-04-27
Test Framework
Runner: None — no unit/integration test framework in custom modules
Static Analysis:
- PHPStan (level 5) present only in
modules/blockreassurance/tests/php/phpstan/phpstan.neon - Not configured for custom modules (
customfeaturetab,AddOrderExtraFields)
Run Commands:
# No test commands defined
# Only available for blockreassurance (pre-installed PS module):
# modules/blockreassurance/tests/php/phpstan/
Test File Organization
Custom modules — no tests found:
modules/customfeaturetab/— no tests directorymodules/AddOrderExtraFields/— no tests directorymodules/addcolumninlist/— no tests directory
Pre-installed modules with static analysis only:
modules/blockreassurance/tests/php/phpstan/— PHPStan config only
Core PrestaShop:
classes/ConfigurationTest.php— system configuration checker (not unit tests)
Coverage
Requirements: None enforced
Current state: No automated test coverage for custom code
Testing Approach in This Project
Since there is no automated test suite, verification is done manually:
- Deploy to production via FTP (
.vscode/ftp-kr.json) - Clear PrestaShop cache — Admin → Advanced Parameters → Performance
- Manual browser testing of affected pages
- Check admin panel for errors after module changes
Recommendations for Adding Tests
If implementing tests in the future:
For PHP modules:
- PHPUnit 9.x (compatible with PHP 7.x)
- Composer dev dependency in module
- Test location:
modules/{name}/tests/
For static analysis:
- PHPStan level 5+ with PrestaShop stubs
- Config:
modules/{name}/phpstan.neon
For Smarty templates:
- Manual verification only (no template test framework)
Testing analysis: 2026-04-27 Update when test patterns change