|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
Inheritance diagram for LanguageInstallationManagerMigratedSourcesAndLocksTest:
Collaboration diagram for LanguageInstallationManagerMigratedSourcesAndLocksTest:Public Member Functions | |
| testValuesOfAMigratedModuleComeFromThePoEvenWithoutAnyLangLine () | |
The tos lines could be removed from lang/ilias_xx.lang: the database is filled from the shipped .po alone. More... | |
| testLangLinesOfAMigratedModuleInNonLocalFilesAreIgnored () | |
| testAModuleIsOnlyMigratedForLanguagesWithAShippedPo () | |
Only languages that ship a .po are migrated: for another language the .lang lines are used. More... | |
| testInstallWithoutLocalChangesWritesNoOverlayOnlyTheTakenOverRecord () | |
| An installation without local changes writes no overlay file: the shipped state is served as is. More... | |
| testAModuleWithAnExistingOverlayIsLockedForTheWholeRunNotJustItsOwnSync () | |
| A module that already has an overlay when insertLanguage() decides what to lock is locked (MigratedLanguageFileSync::withOverlayLock()) for the whole run, not just its final sync(), so a concurrent writer cannot interleave with the read-modify-write in between. More... | |
| testLocksAreAcquiredInSortedOrderRegardlessOfTheContributedDirectoryOrder () | |
| Deadlock protection: modules with an overlay are locked in one global order (module name, byte-wise), whatever order getDirectories() hands them out in. More... | |
| testAModuleWithoutAnOverlayThatGetsOneCreatedDuringTheRunIsReportedAndTheOverlaySurvives () | |
| A module without an overlay at that point is never locked (no lock file is created). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from LanguageInstallationManagerMigratedModulesTestCase | |
| setUp () | |
| tearDown () | |
| db () | |
| repository () | |
| manager (?\Closure $client_data_dir_resolver=null, ?\Closure $language_cache_invalidator=null, bool $with_resolver=true, bool $with_logger=true, ?LoggerInterface $logger=null) | |
| expectManagerWarning () | |
| assertPostConditions () | |
| loggedWarnings () | |
| shipPo (array $entries, string $lang_key='de') | |
| shipSecondModule (array $entries) | |
| A second migrated module "pilot2" next to "pilot". More... | |
| seedOverlay (array $entries) | |
| overlayBase () | |
| overlayPo () | |
| effective () | |
Shipped .po plus overlay delta, as served (MigratedLanguageFileSync::loadModuleTranslations()) - the overlay itself only holds the entries that differ from the shipped .po. More... | |
| writeLang (string $relative_file, array $lines) | |
| resolveToken (string $token) | |
| lngData () | |
| applyLngDataDelete (string $query, array $rows) | |
| Applies one recorded "DELETE FROM lng_data" to $rows, in the two shapes LanguageInstallationManager issues: the bulk delete of unchanged rows of a migrated module ("... local_change IS NULL AND module IN (...)") and the per-module delete of dropped identifiers ("... AND module = ? AND identifier IN (...)"). More... | |
| droppedIdentifiers (string $module) | |
| Identifiers of $module dropped via the per-module "DELETE FROM lng_data ... AND identifier IN (...)", as opposed to keys merely absent because they were never touched. More... | |
| lngModules () | |
| errorLog () | |
| What error_log() wrote during this test so far - PHPUnit redirects error_log to a capture file per test (call expectErrorLog() in tests that expect logging, so it is not echoed). More... | |
| shipPluralPo (array $entries, string $header) | |
| writeLocalOverlay (array $flat_values) | |
| seedOverlayMarkedAsMerged (array $entries, array $merged) | |
Protected Attributes inherited from LanguageInstallationManagerMigratedModulesTestCase | |
| const string | NOW = '2026-01-02 03:04:05' |
| const string | MODULE = 'pilot' |
| string | $root |
| LanguageFileDirectory | $directory |
| array | $further_directories = [] |
| array | $quoted = [] |
| array | $queries = [] |
| array | $collation_rows = null |
| array | $pending_rows = [] |
| array | $duplicate_rows = [] |
| array | $local_change_rows = [] |
| array | $db_local_changes = [] |
| array | $db_entries = [] |
| array | $available_languages = [] |
| array | $logged_warnings = [] |
| const string | TWO_FORMS = 'nplurals=2; plural=(n != 1);' |
| const string | THREE_FORMS = 'nplurals=3; plural=(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);' |
Definition at line 34 of file LanguageInstallationManagerMigratedSourcesAndLocksTest.php.
| LanguageInstallationManagerMigratedSourcesAndLocksTest::testAModuleIsOnlyMigratedForLanguagesWithAShippedPo | ( | ) |
Only languages that ship a .po are migrated: for another language the .lang lines are used.
Definition at line 73 of file LanguageInstallationManagerMigratedSourcesAndLocksTest.php.
References LanguageInstallationManagerMigratedModulesTestCase\lngModules(), LanguageInstallationManagerMigratedModulesTestCase\manager(), LanguageInstallationManagerMigratedModulesTestCase\shipPo(), and LanguageInstallationManagerMigratedModulesTestCase\writeLang().
Here is the call graph for this function:| LanguageInstallationManagerMigratedSourcesAndLocksTest::testAModuleWithAnExistingOverlayIsLockedForTheWholeRunNotJustItsOwnSync | ( | ) |
A module that already has an overlay when insertLanguage() decides what to lock is locked (MigratedLanguageFileSync::withOverlayLock()) for the whole run, not just its final sync(), so a concurrent writer cannot interleave with the read-modify-write in between.
Definition at line 106 of file LanguageInstallationManagerMigratedSourcesAndLocksTest.php.
References LanguageInstallationManagerMigratedModulesTestCase\manager(), LanguageInstallationManagerMigratedModulesTestCase\overlayBase(), MigratedPoFixture\overlayLock(), LanguageInstallationManagerMigratedModulesTestCase\seedOverlay(), and LanguageInstallationManagerMigratedModulesTestCase\shipPo().
Here is the call graph for this function:| LanguageInstallationManagerMigratedSourcesAndLocksTest::testAModuleWithoutAnOverlayThatGetsOneCreatedDuringTheRunIsReportedAndTheOverlaySurvives | ( | ) |
A module without an overlay at that point is never locked (no lock file is created).
Definition at line 176 of file LanguageInstallationManagerMigratedSourcesAndLocksTest.php.
References MigratedPoFixture\catalog(), LanguageInstallationManagerMigratedModulesTestCase\expectManagerWarning(), LanguageInstallationManagerMigratedModulesTestCase\manager(), LanguageInstallationManagerMigratedModulesTestCase\overlayBase(), LanguageInstallationManagerMigratedModulesTestCase\overlayPo(), LanguageInstallationManagerMigratedModulesTestCase\shipPo(), and MigratedPoFixture\writePair().
Here is the call graph for this function:| LanguageInstallationManagerMigratedSourcesAndLocksTest::testInstallWithoutLocalChangesWritesNoOverlayOnlyTheTakenOverRecord | ( | ) |
An installation without local changes writes no overlay file: the shipped state is served as is.
Definition at line 87 of file LanguageInstallationManagerMigratedSourcesAndLocksTest.php.
References LanguageInstallationManagerMigratedModulesTestCase\effective(), LanguageInstallationManagerMigratedModulesTestCase\manager(), and LanguageInstallationManagerMigratedModulesTestCase\shipPo().
Here is the call graph for this function:| LanguageInstallationManagerMigratedSourcesAndLocksTest::testLangLinesOfAMigratedModuleInNonLocalFilesAreIgnored | ( | ) |
Definition at line 58 of file LanguageInstallationManagerMigratedSourcesAndLocksTest.php.
References LanguageInstallationManagerMigratedModulesTestCase\lngData(), LanguageInstallationManagerMigratedModulesTestCase\lngModules(), LanguageInstallationManagerMigratedModulesTestCase\manager(), LanguageInstallationManagerMigratedModulesTestCase\shipPo(), and LanguageInstallationManagerMigratedModulesTestCase\writeLang().
Here is the call graph for this function:| LanguageInstallationManagerMigratedSourcesAndLocksTest::testLocksAreAcquiredInSortedOrderRegardlessOfTheContributedDirectoryOrder | ( | ) |
Deadlock protection: modules with an overlay are locked in one global order (module name, byte-wise), whatever order getDirectories() hands them out in.
Definition at line 129 of file LanguageInstallationManagerMigratedSourcesAndLocksTest.php.
References MigratedPoFixture\catalog(), LanguageInstallationManagerMigratedModulesTestCase\db(), MigratedPoFixture\directory(), ILIAS\Language\Setup\LanguageInstallationManager\insertLanguageForInstallation(), LanguageInstallationManagerMigratedModulesTestCase\repository(), MigratedPoFixture\writePair(), and MigratedPoFixture\writePo().
Here is the call graph for this function:| LanguageInstallationManagerMigratedSourcesAndLocksTest::testValuesOfAMigratedModuleComeFromThePoEvenWithoutAnyLangLine | ( | ) |
The tos lines could be removed from lang/ilias_xx.lang: the database is filled from the shipped .po alone.
Definition at line 40 of file LanguageInstallationManagerMigratedSourcesAndLocksTest.php.
References LanguageInstallationManagerMigratedModulesTestCase\lngData(), LanguageInstallationManagerMigratedModulesTestCase\lngModules(), LanguageInstallationManagerMigratedModulesTestCase\manager(), LanguageInstallationManagerMigratedModulesTestCase\shipPo(), and LanguageInstallationManagerMigratedModulesTestCase\writeLang().
Here is the call graph for this function: