|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
Entry rules of MigratedLanguageFileSync: delta/reset decisions, database sanitising, overlay presence, msgctxt handling. More...
Inheritance diagram for MigratedLanguageFileSyncEntryRulesTest:
Collaboration diagram for MigratedLanguageFileSyncEntryRulesTest:Public Member Functions | |
| testBelongsInDelta (?string $shipped_value, string $value, bool $expected) | |
| belongsInDelta() alone decides what enters the overlay; tested without sync()'s file I/O. More... | |
| testResolveLocalValue (?string $shipped_value, string $value, string $expected) | |
Shared by belongsInDelta() and ilObjLanguageExt::_saveValues(): an empty value resets to the shipped one, but only for a key the shipped .po carries. More... | |
| testDatabaseValuesSanitizesOnlyAnUnmodifiedValueEqualToTheShippedOne () | |
| databaseValues() sanitises only an unmodified value equal to the shipped one (for the database mirror); a locally changed value stays untouched, its markup is checked by the caller. More... | |
| testDatabaseValuesLeavesAnAlreadyAllowedUnmodifiedValueByteIdentical () | |
| testDatabaseValuesOfSanitizesAgainstTheRealShippedPo () | |
| testDatabaseValuesOfLeavesEntriesUnchangedWhenTheModuleIsNotMigratedForTheLanguage () | |
A module not migrated for the language (no shipped .po): $entries come back unchanged. More... | |
| testDatabaseValuesOfLeavesEntriesUnchangedWhenTheShippedPoCannotBeRead () | |
An unreadable shipped .po must not abort the database write: $entries come back unchanged (the overlay write reports the file). More... | |
| testHasOverlayIsTrueWhenEitherOverlayFileExists () | |
| testHasOverlayIsFalseWithoutAnyOverlayFile () | |
| testHasOverlayIsFalseForAnUnknownModuleOrWithoutClientDataDir () | |
| testHasOverlayIsTrueEvenForAnIrregularFileAtTheOverlayPosition () | |
| hasOverlay() reports a non-regular file (e.g. More... | |
| testModuleEntriesIncludesAnEntryWithoutAnyContext () | |
An entry without msgctxt (null) belongs to whichever module reads the catalog. More... | |
| testModuleEntriesIgnoresAnEntryOfAForeignContext (string $context) | |
| An entry with an empty msgctxt is a foreign context, not "no context". More... | |
| testModuleEntriesPrefersTheModuleContextEntryOverTheContextlessOne (bool $module_first) | |
| A key with and without context: the module-context entry wins regardless of catalog order. More... | |
| testFindModuleEntryFallsBackToTheContextlessEntry () | |
| testFindModuleEntryPrefersTheModuleContextEntry () | |
| testFindModuleEntryReturnsNullForAForeignContext () | |
| testFindModuleEntryIgnoresAnEmptyStringContextInsteadOfTreatingItAsContextless () | |
BUG (documented, not fixed): unlike moduleEntries(), findModuleEntry()'s fallback $catalog->find(null, $identifier) also matches an entry with msgctxt "" - gettext/gettext builds the key as "{$context}\004{$original}", so null and '' collide. More... | |
| testLoadShippedModuleEntriesIncludesAContextlessEntry () | |
| End-to-end: a contextless shipped entry is served for the module via loadShippedModuleEntries(). More... | |
| testSyncTreatsAContextlessShippedEntryAsThisModulesShippedValue () | |
| End-to-end: sync() reads a contextless shipped entry as the module's shipped value, so resyncing it creates no overlay. More... | |
Static Public Member Functions | |
| static | belongsInDeltaCases () |
| static | resolveLocalValueCases () |
| static | foreignContexts () |
| static | contextOrders () |
Static Public Member Functions inherited from MigratedLanguageFileSyncTestCase | |
| static | refreshFlags () |
Additional Inherited Members | |
Protected Member Functions inherited from MigratedLanguageFileSyncTestCase | |
| setUp () | |
| tearDown () | |
| seedShipped (array $entries, string $lang_key='de', string $module=self::MODULE) | |
| seedOverlay (array $entries, string $lang_key='de') | |
| shippedPo (string $lang_key='de', string $module=self::MODULE) | |
| overlayBase (string $lang_key='de') | |
| overlayPo () | |
| sync (array $entries, bool $refresh=false, ?string $client_data_dir='default') | |
| overlayIdentifiers () | |
| overlayDirectory () | |
| findUnwritable (array $lang_keys=['de'], ?string $client_data_dir='default', ?LanguageFileDirectoryManager $manager=null) | |
Protected Attributes inherited from MigratedLanguageFileSyncTestCase | |
| const string | MODULE = 'stest' |
| string | $fixture_directory |
| string | $client_data_dir |
| string | $ilias_root |
| LanguageFileDirectory | $directory |
| LanguageFileDirectoryManager | $manager |
Entry rules of MigratedLanguageFileSync: delta/reset decisions, database sanitising, overlay presence, msgctxt handling.
Definition at line 34 of file MigratedLanguageFileSyncEntryRulesTest.php.
|
static |
Definition at line 46 of file MigratedLanguageFileSyncEntryRulesTest.php.
|
static |
Definition at line 253 of file MigratedLanguageFileSyncEntryRulesTest.php.
|
static |
Definition at line 229 of file MigratedLanguageFileSyncEntryRulesTest.php.
|
static |
Definition at line 74 of file MigratedLanguageFileSyncEntryRulesTest.php.
| MigratedLanguageFileSyncEntryRulesTest::testBelongsInDelta | ( | ?string | $shipped_value, |
| string | $value, | ||
| bool | $expected | ||
| ) |
belongsInDelta() alone decides what enters the overlay; tested without sync()'s file I/O.
Definition at line 38 of file MigratedLanguageFileSyncEntryRulesTest.php.
| MigratedLanguageFileSyncEntryRulesTest::testDatabaseValuesLeavesAnAlreadyAllowedUnmodifiedValueByteIdentical | ( | ) |
Definition at line 106 of file MigratedLanguageFileSyncEntryRulesTest.php.
| MigratedLanguageFileSyncEntryRulesTest::testDatabaseValuesOfLeavesEntriesUnchangedWhenTheModuleIsNotMigratedForTheLanguage | ( | ) |
A module not migrated for the language (no shipped .po): $entries come back unchanged.
Definition at line 131 of file MigratedLanguageFileSyncEntryRulesTest.php.
| MigratedLanguageFileSyncEntryRulesTest::testDatabaseValuesOfLeavesEntriesUnchangedWhenTheShippedPoCannotBeRead | ( | ) |
An unreadable shipped .po must not abort the database write: $entries come back unchanged (the overlay write reports the file).
Definition at line 150 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedLanguageFileSyncTestCase\shippedPo().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testDatabaseValuesOfSanitizesAgainstTheRealShippedPo | ( | ) |
Definition at line 113 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedLanguageFileSyncTestCase\seedShipped().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testDatabaseValuesSanitizesOnlyAnUnmodifiedValueEqualToTheShippedOne | ( | ) |
databaseValues() sanitises only an unmodified value equal to the shipped one (for the database mirror); a locally changed value stays untouched, its markup is checked by the caller.
Definition at line 89 of file MigratedLanguageFileSyncEntryRulesTest.php.
| MigratedLanguageFileSyncEntryRulesTest::testFindModuleEntryFallsBackToTheContextlessEntry | ( | ) |
Definition at line 259 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedPoFixture\entry().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testFindModuleEntryIgnoresAnEmptyStringContextInsteadOfTreatingItAsContextless | ( | ) |
BUG (documented, not fixed): unlike moduleEntries(), findModuleEntry()'s fallback $catalog->find(null, $identifier) also matches an entry with msgctxt "" - gettext/gettext builds the key as "{$context}\004{$original}", so null and '' collide.
Definition at line 294 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedPoFixture\entry().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testFindModuleEntryPrefersTheModuleContextEntry | ( | ) |
Definition at line 270 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedPoFixture\entry().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testFindModuleEntryReturnsNullForAForeignContext | ( | ) |
Definition at line 281 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedPoFixture\entry().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testHasOverlayIsFalseForAnUnknownModuleOrWithoutClientDataDir | ( | ) |
Definition at line 181 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedLanguageFileSyncTestCase\seedOverlay(), and MigratedLanguageFileSyncTestCase\seedShipped().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testHasOverlayIsFalseWithoutAnyOverlayFile | ( | ) |
Definition at line 174 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedLanguageFileSyncTestCase\seedShipped().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testHasOverlayIsTrueEvenForAnIrregularFileAtTheOverlayPosition | ( | ) |
hasOverlay() reports a non-regular file (e.g.
a directory) as present, unlike is_file(); reading it is covered by assertReadableOverlay().
Definition at line 194 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedLanguageFileSyncTestCase\overlayBase(), and MigratedLanguageFileSyncTestCase\seedShipped().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testHasOverlayIsTrueWhenEitherOverlayFileExists | ( | ) |
Definition at line 166 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedLanguageFileSyncTestCase\seedOverlay(), and MigratedLanguageFileSyncTestCase\seedShipped().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testLoadShippedModuleEntriesIncludesAContextlessEntry | ( | ) |
End-to-end: a contextless shipped entry is served for the module via loadShippedModuleEntries().
Definition at line 303 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedPoFixture\entry(), MigratedLanguageFileSyncTestCase\shippedPo(), and MigratedPoFixture\writePo().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testModuleEntriesIgnoresAnEntryOfAForeignContext | ( | string | $context | ) |
An entry with an empty msgctxt is a foreign context, not "no context".
Definition at line 216 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedPoFixture\entry().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testModuleEntriesIncludesAnEntryWithoutAnyContext | ( | ) |
An entry without msgctxt (null) belongs to whichever module reads the catalog.
Definition at line 203 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedPoFixture\entry().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testModuleEntriesPrefersTheModuleContextEntryOverTheContextlessOne | ( | bool | $module_first | ) |
A key with and without context: the module-context entry wins regardless of catalog order.
Definition at line 236 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedPoFixture\entry().
Here is the call graph for this function:| MigratedLanguageFileSyncEntryRulesTest::testResolveLocalValue | ( | ?string | $shipped_value, |
| string | $value, | ||
| string | $expected | ||
| ) |
Shared by belongsInDelta() and ilObjLanguageExt::_saveValues(): an empty value resets to the shipped one, but only for a key the shipped .po carries.
Definition at line 66 of file MigratedLanguageFileSyncEntryRulesTest.php.
| MigratedLanguageFileSyncEntryRulesTest::testSyncTreatsAContextlessShippedEntryAsThisModulesShippedValue | ( | ) |
End-to-end: sync() reads a contextless shipped entry as the module's shipped value, so resyncing it creates no overlay.
Definition at line 318 of file MigratedLanguageFileSyncEntryRulesTest.php.
References MigratedPoFixture\entry(), MigratedLanguageFileSyncTestCase\overlayBase(), MigratedLanguageFileSyncTestCase\shippedPo(), MigratedLanguageFileSyncTestCase\sync(), and MigratedPoFixture\writePo().
Here is the call graph for this function: