This is an old revision of the document!
Table of Contents
tests/unit/SettingsThemeMemoizationTest.php
Source: tests/unit/SettingsThemeMemoizationTest.php · 266 lines, ~1222 statements · namespace: (global) · `declare(strict_types=1)`: no
SettingsThemeMemoizationTest
Unit tests for the request-scoped memoization introduced by the single-post performance remediation: \ - app_settings()/app_setting() read tbl_settings once per request \ - theme_identifier()/theme_dir() resolve the active theme once per request \ - page_cache_is_enabled()/page_cache_ttl() honor the cache_enabled and
cache_lifetime settings (P3 toggle)
The memoization statics persist for the lifetime of the PHPUnit process, so every case presets the reference holders directly (no DB dependency) and resets them in setUp() to avoid cross-test pollution.
Imports
^ Alias ^ Fully-qualified name ^ | ''TestCase'' | ''PHPUnit\Framework\TestCase'' |
