initializePublicLocale();'), 'A public-page controller does not initialize the shared locale resolver.'); $assert(str_contains($controller, '$this->publicView('), 'A public-page controller does not expose shared locale data to its templates.'); } $assert(str_contains($legal, '$this->publicLocale') && str_contains($legal, "withHeader('Vary', 'Accept-Language, Cookie')"), 'Legal pages do not use the shared locale or declare cache variance.'); $assert(substr_count($home, "publicView('public.error')") === 3 && str_contains($routes, "bindCurrentRequest(") && str_contains($routes, "'public.error'"), 'Explicit and framework-level public error pages do not bind the copy catalog.'); foreach ([$base, $home, $auth, $password, $legal] as $controller) { $assert(!str_contains($controller, "Configurations::where('name', 'language'") && !str_contains($controller, "Config::get('language'"), 'A public page still depends on the removed administrator language setting.'); } $layoutHeader = $read('web/resources/views/venix/auth/layout_header.tpl'); $layoutFooter = $read('web/resources/views/venix/auth/layout_footer.tpl'); $siteHeader = $read('web/resources/views/venix/home/site_header.tpl'); $navActions = $read('web/resources/views/venix/home/nav_actions.tpl'); $languageSwitch = $read('web/resources/views/venix/home/language_switch.tpl'); $siteFooter = $read('web/resources/views/venix/home/site_footer.tpl'); $css = $read('web/public/theme/venix/css/home.css'); $accountCss = $read('web/public/cloud/account.css'); $assert(str_contains($layoutHeader, "include file='home/site_header.tpl'") && str_contains($layoutHeader, 'theme/venix/css/home.css'), 'Authentication pages do not reuse the landing-page header and its stylesheet.'); $assert(str_contains($layoutFooter, "include file='home/site_footer.tpl'"), 'Authentication pages do not reuse the landing-page footer.'); foreach (['auth/login.tpl', 'auth/register.tpl', 'password/reset.tpl', 'password/token.tpl'] as $templatePath) { $template = $read('web/resources/views/venix/' . $templatePath); $assert(str_contains($template, "include file='auth/layout_footer.tpl'"), $templatePath . ' does not include the persistent public footer.'); $assert(!str_contains($template, "include file='auth/copyright.tpl'"), $templatePath . ' still includes the retired local copyright fragment.'); } $assert(str_contains($siteHeader, "include file='home/nav_actions.tpl'") && str_contains($navActions, "include file='home/language_switch.tpl'") && str_contains($languageSwitch, '$user_copy_languages') && str_contains($languageSwitch, '$available_language.url') && str_contains($languageSwitch, '= 2026102804, 'The shared browser asset version was not advanced with the navigation styles.'); echo "Public page locale and shared-layout contract tests passed.\n";