| Next revision | Previous revision |
| scriptlog:tests:languageswitcherfixture [2026/09/26 09:09] – admin admin | scriptlog:tests:languageswitcherfixture [2026/09/26 09:34] (current) – admin admin |
|---|
| ======= Properties (1) ======= | ======= Properties (1) ======= |
| |
| ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ | ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ |
| | ''private static'' | ''static'' | ''$dbc'' | ''null;'' | 20 | | | ''private static'' | ''static'' | ''$dbc'' | ''null'' | 20 | |
| |
| ======= Methods (12) ======= | ======= Methods (12) ======= |
| |
| ^ Visibility ^ Method ^ Summary ^ Line ^ | ^ Visibility ^ Method ^ Summary ^ Line ^ |
| | public static | ''initDb()'' | Initialize database connection | 25 | | | public static | ''initDb()'' | Initialize database connection | 25 | |
| | public static | ''getDb()'' | (undocumented) | 46 | | | public static | ''getDb()'' | (undocumented) | 46 | |
| | public static | ''isDbAvailable()'' | (undocumented) | 52 | | | public static | ''isDbAvailable()'' | (undocumented) | 52 | |
| | public static | ''getLanguages()'' | Get languages from database | 61 | | | public static | ''getLanguages()'' | Get languages from database | 61 | |
| | public static | ''getPostsByLocale()'' | Get posts filtered by locale from the real database | 73 | | | public static | ''getPostsByLocale()'' | Get posts filtered by locale from the real database | 73 | |
| | public static | ''getTopicsByLocale()'' | Get topics filtered by locale from the real database | 88 | | | public static | ''getTopicsByLocale()'' | Get topics filtered by locale from the real database | 88 | |
| | public static | ''getMenuItemsByLocale()'' | Get menu items filtered by locale from the real database | 103 | | | public static | ''getMenuItemsByLocale()'' | Get menu items filtered by locale from the real database | 103 | |
| | public static | ''getAllPublishedPosts()'' | Get all published posts (no locale filter) | 118 | | | public static | ''getAllPublishedPosts()'' | Get all published posts (no locale filter) | 118 | |
| | public static | ''getLanguageDirectionFromDb()'' | Lookup language direction from real database (same logic as I18nManager::getLan… | 130 | | | public static | ''getLanguageDirectionFromDb()'' | Lookup language direction from real database (same logic as I18nManager::getLan… | 130 | |
| | public static | ''processSwitchLang()'' | Process switch-lang — replicates lib/main.php lines 103-129 EXACTLY. | 155 | | | public static | ''processSwitchLang()'' | Process switch-lang — replicates lib/main.php lines 103-129 EXACTLY. | 155 | |
| | public static | ''detectLocale()'' | Detect locale from session/cookie/default | 215 | | | public static | ''detectLocale()'' | Detect locale from session/cookie/default | 215 | |
| | public static | ''bootstrapI18nManager()'' | Initialize I18nManager for testing real is_rtl() function. | 241 | | | public static | ''bootstrapI18nManager()'' | Initialize I18nManager for testing real is_rtl() function. | 241 | |
| |
| |
| Get posts filtered by locale from the real database | Get posts filtered by locale from the real database |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$locale'' | ''string'' | //required// | //none// | | | ''$locale'' | ''string'' | //required// | //none// | |
| |
| **Returns:** ''array'' | **Returns:** ''array'' |
| Get topics filtered by locale from the real database | Get topics filtered by locale from the real database |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$locale'' | ''string'' | //required// | //none// | | | ''$locale'' | ''string'' | //required// | //none// | |
| |
| **Returns:** ''array'' | **Returns:** ''array'' |
| Get menu items filtered by locale from the real database | Get menu items filtered by locale from the real database |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$locale'' | ''string'' | //required// | //none// | | | ''$locale'' | ''string'' | //required// | //none// | |
| |
| **Returns:** ''array'' | **Returns:** ''array'' |
| Lookup language direction from real database (same logic as I18nManager::getLanguageDirection) | Lookup language direction from real database (same logic as I18nManager::getLanguageDirection) |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$locale'' | ''string'' | //required// | //none// | | | ''$locale'' | ''string'' | //required// | //none// | |
| |
| **Returns:** ''string'' | **Returns:** ''string'' |
| \- Returns result struct instead of exit() | \- Returns result struct instead of exit() |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$session (by reference)'' | ''array'' | //required// | //none// | | | ''$session (by reference)'' | ''array'' | //required// | //none// | |
| | ''$get'' | ''array'' | //required// | //none// | | | ''$get'' | ''array'' | //required// | //none// | |
| |
| **Returns:** ''array'' | **Returns:** ''array'' |
| Same logic as the real LocaleDetector + config default | Same logic as the real LocaleDetector + config default |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$session'' | ''array'' | //required// | //none// | | | ''$session'' | ''array'' | //required// | //none// | |
| | ''$cookie'' | ''array'' | //required// | //none// | | | ''$cookie'' | ''array'' | //required// | //none// | |
| |
| **Returns:** ''string'' | **Returns:** ''string'' |
| ======= Conditional Includes ======= | ======= Conditional Includes ======= |
| |
| ^ Mode ^ Target ^ Line ^ | ^ Mode ^ Target ^ Line ^ |
| | ''require'' | ''require_once __DIR__ . '/../../public/themes/blog/functions.php';'' | 15 | | | ''require'' | ''require_once __DIR__ . '/../../public/themes/blog/functions.php';'' | 15 | |
| |
| |