Quality

Tests

PHPUnit tests, with no Composer dependency in the module (PHPUnit is installed on the development machine, not shipped). tests/FaPageKeyTest.php pins down the contract of normaliseUrl() — the most sensitive spot of the module: too loose a normalisation serves one visitor's page to another, too strict a one drops the hit rate without anyone noticing — and device detection. tests/FaUtilsTest.php checks crawler detection. tests/FaLcpBoosterTest.php checks the choice of the main image (logos, icons and small images skipped). tests/FaAuditTest.php checks how blocks are read during personal block detection (nested blocks, neutralised tokens).

# from the module folder, on a development shop
cd modules/freshappprestacache && phpunit
Loading...
Back to top