|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
Covers the private static databaseRowsOfMigratedModule(): it folds the buffered per-form lng_data rows of a plural message into the single row the database must end up with (default form's value, first non-null remarks, local_change only if the merged value differs from the shipped default). More...
Inheritance diagram for LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest:
Collaboration diagram for LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest:Public Member Functions | |
| testTwoFormRowsFoldIntoOneRowWithTheDefaultFormsValue () | |
| Two buffered form rows fold into one row under the plain identifier, with the default form's (msgstr[1], count >= 2) value of the module's final content. More... | |
| testAPlainRowOfAnUnrelatedIdentifierIsKeptUnchanged () | |
| A plain row of an identifier that is not a plural message of the shipped state (here the separately shipped "poll_population_singular", see pluralMessageOf()) is kept untouched. More... | |
| testRemarksParameterOverridesTheRowsOwnRemarkForAPlainIdentifier () | |
| $remarks (from migratedModuleRemarks()) overrides the remark of the buffered rows, for plain identifiers and merged plural rows alike. More... | |
| testRemarksParameterOverridesTheMergedRemarkOfAPluralMessage () | |
| testAnIdentifierNotInRemarksKeepsTheRowsOwnRemark () | |
| An identifier not named in $remarks keeps the rows' own remark. More... | |
| testLocalChangeIsNullWhenTheMergedDefaultFormValueMatchesTheShippedOne () | |
| local_change depends on the merged default-form VALUE differing from the shipped default, not on a stale local_change timestamp of some row. More... | |
| testTheFirstNonNullLocalChangeAndRemarksOfTheFormRowsAreKeptWhenTheValueActuallyChanged () | |
| The first non-null local_change/remarks among the form rows wins once the merged value differs; a later null must not erase it. More... | |
| testAnEarlierNonNullLocalChangeSurvivesALaterRowsNullOnesWhenTheValueActuallyChanged () | |
| Same, with the local_change-carrying row processed first. More... | |
| testFormRowsWithNoValueInTheFinalContentAreDroppedEntirely () | |
| A form row whose message has no value in the final content is dropped instead of written with a bogus value. More... | |
| testASingleFormLanguageStillFoldsIntoOneRow () | |
| A single-form language (nplurals=1) still folds into one row keyed by its identifier. More... | |
Private Member Functions | |
| call (array $rows, array $final_entries, array $shipped_entries, array $remarks=[]) | |
Private Attributes | |
| const | SHIPPED |
Covers the private static databaseRowsOfMigratedModule(): it folds the buffered per-form lng_data rows of a plural message into the single row the database must end up with (default form's value, first non-null remarks, local_change only if the merged value differs from the shipped default).
Definition at line 29 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
|
private |
| array<string,array{0 | string, 1: ?string, 2: ?string}> $rows |
| array<string,string> | $final_entries |
| array<string,string> | $shipped_entries |
| array<string,string> | $remarks identifier => remark (see migratedModuleRemarks()), written into the row instead of the buffered rows' own remark |
Definition at line 41 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
References ILIAS\Scripts\PHPStan\$rows.
Referenced by testAnEarlierNonNullLocalChangeSurvivesALaterRowsNullOnesWhenTheValueActuallyChanged(), testAnIdentifierNotInRemarksKeepsTheRowsOwnRemark(), testAPlainRowOfAnUnrelatedIdentifierIsKeptUnchanged(), testASingleFormLanguageStillFoldsIntoOneRow(), testFormRowsWithNoValueInTheFinalContentAreDroppedEntirely(), testLocalChangeIsNullWhenTheMergedDefaultFormValueMatchesTheShippedOne(), testRemarksParameterOverridesTheMergedRemarkOfAPluralMessage(), testRemarksParameterOverridesTheRowsOwnRemarkForAPlainIdentifier(), testTheFirstNonNullLocalChangeAndRemarksOfTheFormRowsAreKeptWhenTheValueActuallyChanged(), and testTwoFormRowsFoldIntoOneRowWithTheDefaultFormsValue().
Here is the caller graph for this function:| LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest::testAnEarlierNonNullLocalChangeSurvivesALaterRowsNullOnesWhenTheValueActuallyChanged | ( | ) |
Same, with the local_change-carrying row processed first.
Definition at line 181 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
References ILIAS\Scripts\PHPStan\$rows, and call().
Here is the call graph for this function:| LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest::testAnIdentifierNotInRemarksKeepsTheRowsOwnRemark | ( | ) |
An identifier not named in $remarks keeps the rows' own remark.
Definition at line 127 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
References ILIAS\Scripts\PHPStan\$rows, and call().
Here is the call graph for this function:| LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest::testAPlainRowOfAnUnrelatedIdentifierIsKeptUnchanged | ( | ) |
A plain row of an identifier that is not a plural message of the shipped state (here the separately shipped "poll_population_singular", see pluralMessageOf()) is kept untouched.
Definition at line 78 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
References ILIAS\Scripts\PHPStan\$rows, and call().
Here is the call graph for this function:| LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest::testASingleFormLanguageStillFoldsIntoOneRow | ( | ) |
A single-form language (nplurals=1) still folds into one row keyed by its identifier.
Definition at line 219 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
References ILIAS\Scripts\PHPStan\$rows, and call().
Here is the call graph for this function:| LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest::testFormRowsWithNoValueInTheFinalContentAreDroppedEntirely | ( | ) |
A form row whose message has no value in the final content is dropped instead of written with a bogus value.
Definition at line 200 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
References ILIAS\Scripts\PHPStan\$rows, and call().
Here is the call graph for this function:| LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest::testLocalChangeIsNullWhenTheMergedDefaultFormValueMatchesTheShippedOne | ( | ) |
local_change depends on the merged default-form VALUE differing from the shipped default, not on a stale local_change timestamp of some row.
Remarks are independent of that: the first non-null one wins, here from the second row.
Definition at line 141 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
References ILIAS\Scripts\PHPStan\$rows, and call().
Here is the call graph for this function:| LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest::testRemarksParameterOverridesTheMergedRemarkOfAPluralMessage | ( | ) |
Definition at line 111 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
References ILIAS\Scripts\PHPStan\$rows, and call().
Here is the call graph for this function:| LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest::testRemarksParameterOverridesTheRowsOwnRemarkForAPlainIdentifier | ( | ) |
$remarks (from migratedModuleRemarks()) overrides the remark of the buffered rows, for plain identifiers and merged plural rows alike.
Definition at line 94 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
References ILIAS\Scripts\PHPStan\$rows, and call().
Here is the call graph for this function:| LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest::testTheFirstNonNullLocalChangeAndRemarksOfTheFormRowsAreKeptWhenTheValueActuallyChanged | ( | ) |
The first non-null local_change/remarks among the form rows wins once the merged value differs; a later null must not erase it.
Definition at line 162 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
References ILIAS\Scripts\PHPStan\$rows, and call().
Here is the call graph for this function:| LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest::testTwoFormRowsFoldIntoOneRowWithTheDefaultFormsValue | ( | ) |
Two buffered form rows fold into one row under the plain identifier, with the default form's (msgstr[1], count >= 2) value of the module's final content.
Definition at line 58 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.
References ILIAS\Scripts\PHPStan\$rows, and call().
Here is the call graph for this function:
|
private |
Definition at line 48 of file LanguageInstallationManagerDatabaseRowsOfMigratedModuleTest.php.