Drupal PHP Cross Reference Content Management Systems

Summary: /modules/locale/locale.test - 3061 lines - 120550 bytes - Source - Print

Description: (no description)

Included or required:0 times
Referenced: 0 times
Includes or requires: 3 files
 includes/install.inc
 includes/language.inc
 includes/locale.inc

Defines 22 classes

LocaleConfigurationTest:: (3 methods):
getInfo()
setUp()
testLanguageConfiguration()

LocaleLibraryInfoAlterTest:: (3 methods):
getInfo()
setUp()
testLibraryInfoAlter()

LocaleJavascriptTranslationTest:: (3 methods):
getInfo()
setUp()
testFileParsing()

LocaleTranslationFunctionalTest:: (6 methods):
getInfo()
setUp()
testStringTranslation()
testJavaScriptTranslation()
testStringValidation()
testStringSearch()

LocalePluralFormatTest:: (7 methods):
getInfo()
setUp()
testGetPluralFormat()
assertPluralFormat()
importPoFile()
getPoFileWithSimplePlural()
getPoFileWithComplexPlural()

LocaleImportFunctionalTest:: (15 methods):
getInfo()
setUp()
testStandalonePoFile()
testAutomaticModuleTranslationImportLanguageEnable()
testLanguageContext()
testEmptyMsgstr()
importPoFile()
getPoFile()
getBadPoFile()
getOverwritePoFile()
getPoFileWithContext()
getPoFileWithEmptyMsgstr()
getPoFileWithMsgstr()
getPoFileWithMissingPlural()
getPoFileWithBrokenPlural()

LocaleExportFunctionalTest:: (5 methods):
getInfo()
setUp()
testExportTranslation()
testExportTranslationTemplateFile()
getPoFile()

LocaleInstallTest:: (3 methods):
getInfo()
setUp()
testFunctionSignatures()

LocaleUninstallFunctionalTest:: (3 methods):
getInfo()
setUp()
testUninstallProcess()

LocaleUninstallFrenchFunctionalTest:: (2 methods):
getInfo()
setUp()

LocaleLanguageSwitchingFunctionalTest:: (3 methods):
getInfo()
setUp()
testLanguageBlock()

LocaleBrowserDetectionTest:: (2 methods):
getInfo()
testLanguageFromBrowser()

LocaleUserLanguageFunctionalTest:: (3 methods):
getInfo()
setUp()
testUserLanguageConfiguration()

LocaleUserCreationTest:: (3 methods):
getInfo()
setUp()
testLocalUserCreation()

LocalePathFunctionalTest:: (3 methods):
getInfo()
setUp()
testPathLanguageConfiguration()

LocaleContentFunctionalTest:: (4 methods):
getInfo()
setUp()
testMachineNameLTR()
testContentTypeLanguageConfiguration()

LocaleUILanguageNegotiationTest:: (6 methods):
getInfo()
setUp()
testUILanguageNegotiation()
runTest()
testUrlLanguageFallback()
testLanguageDomain()

LocaleUrlRewritingTest:: (4 methods):
getInfo()
setUp()
testUrlRewritingEdgeCases()
checkUrl()

LocaleMultilingualFieldsFunctionalTest:: (4 methods):
getInfo()
setUp()
testMultilingualNodeForm()
testMultilingualDisplaySettings()

LocaleCommentLanguageFunctionalTest:: (3 methods):
getInfo()
setUp()
testCommentLanguage()

LocaleDateFormatsFunctionalTest:: (3 methods):
getInfo()
setUp()
testLocalizeDateFormats()

LocaleLanguageNegotiationInfoFunctionalTest:: (5 methods):
getInfo()
setUp()
testInfoAlterations()
languageNegotiationUpdate()
checkFixedLanguageTypes()

Class: LocaleConfigurationTest

Functional tests for the language configuration forms.

getInfo()  line: 28
No description
setUp()  line: 36
No description
testLanguageConfiguration()  line: 40
Functional tests for adding, editing and deleting languages.

Class: LocaleLibraryInfoAlterTest

Tests localization of the JavaScript libraries.

Currently, only the jQuery datepicker is localized using Drupal translations.
getInfo()  line: 188
No description
setUp()  line: 196
No description
testLibraryInfoAlter()  line: 200
Verifies that the datepicker can be localized.

Class: LocaleJavascriptTranslationTest

Functional tests for JavaScript parsing for translatable strings.

getInfo()  line: 216
No description
setUp()  line: 224
No description
testFileParsing()  line: 228
No description

Class: LocaleTranslationFunctionalTest

Functional test for string translation and validation.

getInfo()  line: 305
No description
setUp()  line: 313
No description
testStringTranslation()  line: 317
Adds a language and tests string translation by users with the appropriate permissions.

testJavaScriptTranslation()  line: 448
No description
testStringValidation()  line: 507
Tests the validation of the translation input.

testStringSearch()  line: 571
Tests translation search form.

Class: LocalePluralFormatTest

Tests plural index computation functionality.

getInfo()  line: 741
No description
setUp()  line: 749
No description
testGetPluralFormat()  line: 765
Tests locale_get_plural() functionality.

assertPluralFormat($count, $lang, $expected_result line: 777
Helper assert to test locale_get_plural page.

param: $count
param: $lang
param: $expected_result
param: $message
importPoFile($contents, array $options = array()  line: 803
Imports a standalone .po file in a given language.

param: $contents
param: $options
getPoFileWithSimplePlural()  line: 819
Returns a .po file with a simple plural formula.

getPoFileWithComplexPlural()  line: 842
Returns a .po file with a complex plural formula.

Class: LocaleImportFunctionalTest

Functional tests for the import of translation files.

getInfo()  line: 871
No description
setUp()  line: 879
A user able to create languages and import translations.

testStandalonePoFile()  line: 891
Test import of standalone .po files.

testAutomaticModuleTranslationImportLanguageEnable()  line: 1008
Test automatic import of a module's translation files when a language is
enabled.

testLanguageContext()  line: 1047
Test msgctxt context support.

testEmptyMsgstr()  line: 1060
Test empty msgstr at end of .po file see #611786.

importPoFile($contents, array $options = array()  line: 1097
Helper function: import a standalone .po file in a given language.

param: $contents
param: $options
getPoFile()  line: 1113
Helper function that returns a proper .po file.

getBadPoFile()  line: 1154
Helper function that returns a bad .po file.

getOverwritePoFile()  line: 1179
Helper function that returns a proper .po file, for testing overwriting
existing translations.

getPoFileWithContext()  line: 1201
Helper function that returns a .po file with context.

getPoFileWithEmptyMsgstr()  line: 1225
Helper function that returns a .po file with an empty last item.

getPoFileWithMsgstr()  line: 1243
Helper function that returns a .po file with an empty last item.

getPoFileWithMissingPlural()  line: 1266
Returns a .po file with a missing plural formula.

getPoFileWithBrokenPlural()  line: 1283
Returns a .po file with a broken plural formula.

Class: LocaleExportFunctionalTest

Functional tests for the export of translation files.

getInfo()  line: 1307
No description
setUp()  line: 1315
A user able to create languages and export translations.

testExportTranslation()  line: 1327
Test exportation of translations.

testExportTranslationTemplateFile()  line: 1352
Test exportation of translation template file.

getPoFile()  line: 1365
Helper function that returns a proper .po file.

Class: LocaleInstallTest

Tests for the st() function.

getInfo()  line: 1389
No description
setUp()  line: 1397
No description
testFunctionSignatures()  line: 1404
Verify that function signatures of t() and st() are equal.

Class: LocaleUninstallFunctionalTest

Locale uninstall with English UI functional test.

getInfo()  line: 1418
No description
setUp()  line: 1426
The default language set for the UI before uninstall.

testUninstallProcess()  line: 1436
Check if the values of the Locale variables are correct after uninstall.

Class: LocaleUninstallFrenchFunctionalTest

Locale uninstall with French UI functional test.

Because this class extends LocaleUninstallFunctionalTest, it doesn't require a new
test of its own. Rather, it switches the default UI language in setUp and then
runs the testUninstallProcess (which it inherits from LocaleUninstallFunctionalTest)
to test with this new language.
getInfo()  line: 1545
No description
setUp()  line: 1553
No description

Class: LocaleLanguageSwitchingFunctionalTest

Functional tests for the language switching feature.

getInfo()  line: 1564
No description
setUp()  line: 1572
No description
testLanguageBlock()  line: 1580
Functional tests for the language switcher block.

Class: LocaleBrowserDetectionTest

Test browser language detection.

getInfo()  line: 1642
No description
testLanguageFromBrowser()  line: 1650
Unit tests for the locale_language_from_browser() function.

Class: LocaleUserLanguageFunctionalTest

Functional tests for a user's ability to change their default language.

getInfo()  line: 1761
No description
setUp()  line: 1769
No description
testUserLanguageConfiguration()  line: 1773
Test if user can change their default language.

Class: LocaleUserCreationTest

Functional test for language handling during user creation.

getInfo()  line: 1857
No description
setUp()  line: 1865
No description
testLocalUserCreation()  line: 1870
Functional test for language handling during user creation.

Class: LocalePathFunctionalTest

Functional tests for configuring a different path alias per language.

getInfo()  line: 1958
No description
setUp()  line: 1966
No description
testPathLanguageConfiguration()  line: 1970
Test if a language can be associated with a path alias.

Class: LocaleContentFunctionalTest

Functional tests for multilingual support on nodes.

getInfo()  line: 2097
No description
setUp()  line: 2105
No description
testMachineNameLTR()  line: 2109
Verifies that machine name fields are always LTR.

testContentTypeLanguageConfiguration()  line: 2137
Test if a content type can be set to multilingual and language setting is
present on node add and edit forms.

Class: LocaleUILanguageNegotiationTest

Test UI language negotiation
1. URL (PATH) > DEFAULT
UI Language base on URL prefix, browser language preference has no
influence:
admin/config
UI in site default language
zh-hans/admin/config
UI in Chinese
blah-blah/admin/config
404
2. URL (PATH) > BROWSER > DEFAULT
admin/config
UI in user's browser language preference if the site has that
language enabled, if not, the default language
zh-hans/admin/config
UI in Chinese
blah-blah/admin/config
404
3. URL (DOMAIN) > DEFAULT
http://example.com/admin/config
UI language in site default
http://example.cn/admin/config
UI language in Chinese

getInfo()  line: 2268
No description
setUp()  line: 2276
No description
testUILanguageNegotiation()  line: 2284
Tests for language switching by URL path.

runTest($test line: 2434
No description
testUrlLanguageFallback()  line: 2450
Test URL language detection when the requested URL has no language.

testLanguageDomain()  line: 2494
Tests url() when separate domains are used for multiple languages.

Class: LocaleUrlRewritingTest

Test that URL rewriting works as expected.

getInfo()  line: 2549
No description
setUp()  line: 2557
No description
testUrlRewritingEdgeCases()  line: 2588
Check that disabled or non-installed languages are not considered.

checkUrl($language, $message1, $message2 line: 2603
Check URL rewriting for the given language.

The test is performed with a fixed URL (the default front page) to simply
check that language prefixes are not added to it and that the prefixed URL
is actually not working.

Class: LocaleMultilingualFieldsFunctionalTest

Functional test for multilingual fields.

getInfo()  line: 2631
No description
setUp()  line: 2639
No description
testMultilingualNodeForm()  line: 2666
Test if field languages are correctly set through the node form.

testMultilingualDisplaySettings()  line: 2718
No description

Class: LocaleCommentLanguageFunctionalTest

Functional tests for comment language.

getInfo()  line: 2749
No description
setUp()  line: 2757
No description
testCommentLanguage()  line: 2792
Test that comment language is properly set.

Class: LocaleDateFormatsFunctionalTest

Functional tests for localizing date formats.

getInfo()  line: 2843
No description
setUp()  line: 2851
No description
testLocalizeDateFormats()  line: 2859
Functional tests for localizing date formats.

Class: LocaleLanguageNegotiationInfoFunctionalTest

Functional test for language types/negotiation info.

getInfo()  line: 2912
No description
setUp()  line: 2920
No description
testInfoAlterations()  line: 2928
Tests alterations to language types/negotiation info.

languageNegotiationUpdate($op = 'enable')  line: 3014
Update language types/negotiation information.

Manually invoke locale_modules_enabled()/locale_modules_disabled() since
they would not be invoked after enabling/disabling locale_test the first
time.
checkFixedLanguageTypes()  line: 3043
Check that language negotiation for fixed types matches the stored one.

title

Body