refactor: one site-wide Divi cache clear and one compatibility row (review M-1, M-2)
DiviSaver's site-wide scopes and the Theme Builder tools now share DiviThemeBuilder::clearSiteCaches(), which clears the Theme Builder cache even when ET_Core_PageResource is missing. lit-site-status no longer lists et_theme_builder_clear_wp_cache twice: the Theme Builder functions row covers it, and the post-type row uses DiviThemeBuilder::postTypes(). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -35,6 +35,21 @@ final class DiviThemeBuilderTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
/** Review M-1: one site-wide clear – every static CSS file and the Theme Builder cache. */
|
||||
public function testClearCachesClearsTheSiteWideCaches(): void
|
||||
{
|
||||
\ET_Core_PageResource::$removed = [];
|
||||
$cleared = [];
|
||||
Functions\when('et_theme_builder_clear_wp_cache')->alias(static function (string $what) use (&$cleared): void {
|
||||
$cleared[] = $what;
|
||||
});
|
||||
|
||||
(new DiviThemeBuilder())->clearCaches();
|
||||
|
||||
self::assertSame([['all', 'all', true]], \ET_Core_PageResource::$removed);
|
||||
self::assertSame(['all'], $cleared);
|
||||
}
|
||||
|
||||
/** Audit L4: a template is listed when any Theme Builder post's _et_template row names it. */
|
||||
public function testIsListedAnywhereAsksEveryThemeBuilderPost(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user