Drupal 8  8.0.2
ConfigTranslationUiTest Class Reference
Inheritance diagram for ConfigTranslationUiTest:

Public Member Functions

 testSiteInformationTranslationUi ()
 
 testSourceValueDuplicateSave ()
 
 testContactConfigEntityTranslation ()
 
 testDateFormatTranslation ()
 
 testAccountSettingsConfigurationTranslation ()
 
 testSourceAndTargetLanguage ()
 
 testViewsTranslationUI ()
 
 testPluralConfigStringsSourceElements ()
 
 testPluralConfigStrings ()
 
 testFieldConfigTranslation ()
 
 testLocaleDBStorage ()
 
 testSingleLanguageUI ()
 
 testAlterInfo ()
 
 getPoFile ($plurals)
 
- Public Member Functions inherited from WebTestBase
 __construct ($test_id=NULL)
 
 drupalGetNodeByTitle ($title, $reset=FALSE)
 
- Public Member Functions inherited from TestBase
 __construct ($test_id=NULL)
 
 run (array $methods=array())
 
 errorHandler ($severity, $message, $file=NULL, $line=NULL)
 
 configImporter ()
 
 copyConfig (StorageInterface $source_storage, StorageInterface $target_storage)
 
 getDatabasePrefix ()
 
 getTempFilesDirectory ()
 

Static Public Attributes

static $modules
 

Protected Member Functions

 getTranslation ($config_name, $key, $langcode)
 
 setSiteInformation ($site_name, $site_slogan)
 
 renderContextualLinks ($ids, $current_path)
 
 assertDisabledTextarea ($id)
 
- Protected Member Functions inherited from WebTestBase
 drupalCreateNode (array $settings=array())
 
 drupalCreateContentType (array $values=array())
 
 drupalBuildEntityView (EntityInterface $entity, $view_mode= 'full', $langcode=NULL, $reset=FALSE)
 
 drupalPlaceBlock ($plugin_id, array $settings=array())
 
 assertBlockAppears (Block $block)
 
 assertNoBlockAppears (Block $block)
 
 findBlockInstance (Block $block)
 
 drupalGetTestFiles ($type, $size=NULL)
 
 drupalCompareFiles ($file1, $file2)
 
 drupalLogin (AccountInterface $account)
 
 drupalUserIsLoggedIn ($account)
 
 drupalLogout ()
 
 setUp ()
 
 doInstall ()
 
 prepareSettings ()
 
 initSettings ()
 
 initConfig (ContainerInterface $container)
 
 rebuildAll ()
 
 installParameters ()
 
 setBatch ()
 
 restoreBatch ()
 
 initUserSession ()
 
 initKernel (Request $request)
 
 addCustomTranslations ($langcode, array $values)
 
 writeCustomTranslations ()
 
 rebuildContainer ()
 
 resetAll ()
 
 refreshVariables ()
 
 tearDown ()
 
 curlInitialize ()
 
 curlExec ($curl_options, $redirect=FALSE)
 
 curlHeaderCallback ($curlHandler, $header)
 
 curlClose ()
 
 isInChildSite ()
 
 drupalGet ($path, array $options=array(), array $headers=array())
 
 drupalGetJSON ($path, array $options=array(), array $headers=array())
 
 drupalGetWithFormat ($path, $format, array $options=[], array $headers=[])
 
 drupalGetAjax ($path, array $options=array(), array $headers=array())
 
 drupalGetXHR ($path, array $options=array(), array $headers=array())
 
 drupalPostForm ($path, $edit, $submit, array $options=array(), array $headers=array(), $form_html_id=NULL, $extra_post=NULL)
 
 drupalPostAjaxForm ($path, $edit, $triggering_element, $ajax_path=NULL, array $options=array(), array $headers=array(), $form_html_id=NULL, $ajax_settings=NULL)
 
 drupalProcessAjaxResponse ($content, array $ajax_response, array $ajax_settings, array $drupal_settings)
 
 drupalPost ($path, $accept, array $post, $options=array())
 
 drupalPostWithFormat ($path, $format, array $post, $options=[])
 
 getAjaxPageStatePostData ()
 
 serializePostValues ($post=array())
 
 translatePostValues (array $values)
 
 cronRun ()
 
 checkForMetaRefresh ()
 
 drupalHead ($path, array $options=array(), array $headers=array())
 
 handleForm (&$post, &$edit, &$upload, $submit, $form)
 
 clickLink ($label, $index=0)
 
 clickLinkPartialName ($label, $index=0)
 
 clickLinkHelper ($label, $index, $pattern)
 
 getAbsoluteUrl ($path)
 
 drupalGetHeaders ($all_requests=FALSE)
 
 drupalGetHeader ($name, $all_requests=FALSE)
 
 assertHeader ($header, $value, $message= '', $group= 'Browser')
 
 drupalGetMails ($filter=array())
 
 assertUrl ($path, array $options=array(), $message= '', $group= 'Other')
 
 assertResponse ($code, $message= '', $group= 'Browser')
 
 assertNoResponse ($code, $message= '', $group= 'Browser')
 
 assertMail ($name, $value= '', $message= '', $group= 'Email')
 
 assertMailString ($field_name, $string, $email_depth, $message= '', $group= 'Other')
 
 assertMailPattern ($field_name, $regex, $message= '', $group= 'Other')
 
 verboseEmail ($count=1)
 
 prepareRequestForGenerator ($clean_urls=TRUE, $override_server_vars=array())
 
 buildUrl ($path, array $options=array())
 
 assertCacheContext ($expected_cache_context)
 
 assertNoCacheContext ($not_expected_cache_context)
 
 assertCacheTag ($expected_cache_tag)
 
 assertNoCacheTag ($cache_tag)
 
 setHttpResponseDebugCacheabilityHeaders ($value=TRUE)
 
- Protected Member Functions inherited from TestBase
 setUp ()
 
 checkRequirements ()
 
 storeAssertion (array $assertion)
 
 assert ($status, $message= '', $group= 'Other', array $caller=NULL)
 
 getAssertionCall ()
 
 assertTrue ($value, $message= '', $group= 'Other')
 
 assertFalse ($value, $message= '', $group= 'Other')
 
 assertNull ($value, $message= '', $group= 'Other')
 
 assertNotNull ($value, $message= '', $group= 'Other')
 
 assertEqual ($first, $second, $message= '', $group= 'Other')
 
 assertNotEqual ($first, $second, $message= '', $group= 'Other')
 
 assertIdentical ($first, $second, $message= '', $group= 'Other')
 
 assertNotIdentical ($first, $second, $message= '', $group= 'Other')
 
 assertIdenticalObject ($object1, $object2, $message= '', $group= 'Other')
 
 assertNoErrorsLogged ()
 
 assertErrorLogged ($error_message)
 
 pass ($message=NULL, $group= 'Other')
 
 fail ($message=NULL, $group= 'Other')
 
 error ($message= '', $group= 'Other', array $caller=NULL)
 
 verbose ($message)
 
 beforePrepareEnvironment ()
 
 tearDown ()
 
 exceptionHandler ($exception)
 
 settingsSet ($name, $value)
 
 config ($name)
 
 getConfigSchemaExclusions ()
 

Protected Attributes

 $langcodes = array('fr', 'ta')
 
 $adminUser
 
 $translatorUser
 
 $localeStorage
 
- Protected Attributes inherited from WebTestBase
 $profile = 'testing'
 
 $url
 
 $curlHandle
 
 $assertAjaxHeader = TRUE
 
 $headers
 
 $cookies = array()
 
 $dumpHeaders = FALSE
 
 $loggedInUser = FALSE
 
 $rootUser
 
 $cookieFile = NULL
 
 $additionalCurlOptions = array()
 
 $originalBatch
 
 $originalUser = NULL
 
 $originalShutdownCallbacks = array()
 
 $sessionId = NULL
 
 $generatedTestFiles = FALSE
 
 $maximumRedirects = 5
 
 $redirectCount
 
 $maximumMetaRefreshCount = NULL
 
 $metaRefreshCount = 0
 
 $kernel
 
 $configDirectories = array()
 
 $curlCookies = array()
 
 $customTranslations
 
 $classLoader
 
- Protected Attributes inherited from TestBase
 $testId
 
 $siteDirectory = NULL
 
 $databasePrefix = NULL
 
 $timeLimit = 500
 
 $assertions = array()
 
 $skipClasses = array(__CLASS__ => TRUE)
 
 $verboseId = 0
 
 $verboseClassName
 
 $verboseDirectory
 
 $verboseDirectoryUrl
 
 $originalConf
 
 $originalConfig
 
 $originalConfigDirectories
 
 $originalContainer
 
 $originalFileDirectory = NULL
 
 $originalLanguage
 
 $originalPrefix
 
 $originalProfile
 
 $originalSessionName
 
 $originalSettings
 
 $originalShutdownCallbacks
 
 $originalSite
 
 $originalUser
 
 $publicFilesDirectory
 
 $privateFilesDirectory
 
 $tempFilesDirectory
 
 $translationFilesDirectory
 
 $kernel
 
 $container
 
 $configImporter
 
 $strictConfigSchema = TRUE
 
 $httpAuthMethod = CURLAUTH_BASIC
 
 $httpAuthCredentials = NULL
 

Additional Inherited Members

- Static Public Member Functions inherited from TestBase
static insertAssert ($test_id, $test_class, $status, $message= '', $group= 'Other', array $caller=array())
 
static deleteAssert ($message_id)
 
static getDatabaseConnection ()
 
static generatePermutations ($parameters)
 
static filePreDeleteCallback ($path)
 
- Data Fields inherited from WebTestBase
createRole as drupalCreateRole
 
createAdminRole as drupalCreateAdminRole
 
- Data Fields inherited from TestBase
 $results
 
 $verbose
 
 $dieOnFail = FALSE
 
- Static Protected Attributes inherited from TestBase
static $configSchemaCheckerExclusions
 

Detailed Description

Translate settings and entities to various languages.

config_translation

Member Function Documentation

assertDisabledTextarea (   $id)
protected

Asserts that a textarea with a given ID has been disabled from editing.

Parameters
string$idThe HTML ID of the textarea.
Returns
bool TRUE if the assertion passed; FALSE otherwise.

References TestBase\assertEqual(), TestBase\assertFalse(), TestBase\assertTrue(), and SafeMarkup\format().

Here is the call graph for this function:

getPoFile (   $plurals)

Helper function that returns a .po file with a given number of plural forms.

Referenced by ConfigTranslationUiTest\testPluralConfigStrings(), and ConfigTranslationUiTest\testPluralConfigStringsSourceElements().

Here is the caller graph for this function:

getTranslation (   $config_name,
  $key,
  $langcode 
)
protected

Gets translation from locale storage.

Parameters
$config_nameConfiguration object.
$keyTranslation configuration field key.
$langcodeString language code to load translation.
Returns
bool|mixed Returns translation if exists, FALSE otherwise.

References TestBase\assertTrue(), and format_string().

Referenced by ConfigTranslationUiTest\testLocaleDBStorage().

Here is the call graph for this function:

Here is the caller graph for this function:

renderContextualLinks (   $ids,
  $current_path 
)
protected

Get server-rendered contextual links for the given contextual link ids.

Parameters
array$idsAn array of contextual link ids.
string$current_pathThe Drupal path for the page for which the contextual links are rendered.
Returns
string The response body.

References WebTestBase\drupalPostWithFormat().

Referenced by ConfigTranslationUiTest\testViewsTranslationUI().

Here is the call graph for this function:

Here is the caller graph for this function:

setSiteInformation (   $site_name,
  $site_slogan 
)
protected

Sets site name and slogan for default language, helps in tests.

Parameters
string$site_name
string$site_slogan

References WebTestBase\drupalPostForm(), and t().

Referenced by ConfigTranslationUiTest\testSiteInformationTranslationUi(), and ConfigTranslationUiTest\testSourceValueDuplicateSave().

Here is the call graph for this function:

Here is the caller graph for this function:

testAccountSettingsConfigurationTranslation ( )

Tests the account settings translation interface.

This is the only special case so far where we have multiple configuration names involved building up one configuration translation form. Test that the translations are saved for all configuration names properly.

References WebTestBase\drupalGet(), WebTestBase\drupalLogin(), WebTestBase\drupalPostForm(), and t().

Here is the call graph for this function:

testAlterInfo ( )

Tests the config_translation_info_alter() hook.

References WebTestBase\drupalGet(), WebTestBase\drupalLogin(), and t().

Here is the call graph for this function:

testContactConfigEntityTranslation ( )

Tests the contact form translation.

References TestBase\assertEqual(), WebTestBase\assertResponse(), TestBase\assertTrue(), WebTestBase\drupalGet(), WebTestBase\drupalGetMails(), WebTestBase\drupalLogin(), WebTestBase\drupalLogout(), WebTestBase\drupalPostForm(), Drupal\languageManager(), Unicode\strtolower(), and t().

Here is the call graph for this function:

testDateFormatTranslation ( )

Tests date format translation.

References TestBase\assertEqual(), WebTestBase\drupalGet(), WebTestBase\drupalLogin(), WebTestBase\drupalPostForm(), format_date(), Drupal\languageManager(), and t().

Here is the call graph for this function:

testFieldConfigTranslation ( )

Tests the translation of field and field storage configuration.

References WebTestBase\clickLink(), Entity\create(), WebTestBase\drupalGet(), and WebTestBase\drupalLogin().

Here is the call graph for this function:

testLocaleDBStorage ( )

Test translation storage in locale storage.

References TestBase\assertEqual(), TestBase\assertTrue(), TestBase\config(), LanguageInterface\DIRECTION_LTR, WebTestBase\drupalLogin(), WebTestBase\drupalPostForm(), ConfigTranslationUiTest\getTranslation(), and t().

Here is the call graph for this function:

testPluralConfigStrings ( )

Test translation of plural strings with multiple plural forms in config.

References WebTestBase\drupalGet(), WebTestBase\drupalLogin(), WebTestBase\drupalPostForm(), ConfigTranslationUiTest\getPoFile(), and t().

Here is the call graph for this function:

testPluralConfigStringsSourceElements ( )

Test the number of source elements for plural strings in config translation forms.

References WebTestBase\drupalGet(), WebTestBase\drupalLogin(), WebTestBase\drupalPostForm(), ConfigTranslationUiTest\getPoFile(), Drupal\service(), and t().

Here is the call graph for this function:

testSingleLanguageUI ( )

Tests the single language existing.

References WebTestBase\assertResponse(), WebTestBase\drupalGet(), WebTestBase\drupalLogin(), WebTestBase\drupalPostForm(), and t().

Here is the call graph for this function:

testSiteInformationTranslationUi ( )

Tests the site information translation interface.

References WebTestBase\assertUrl(), WebTestBase\clickLink(), WebTestBase\drupalGet(), WebTestBase\drupalLogin(), WebTestBase\drupalPlaceBlock(), WebTestBase\drupalPostForm(), ConfigTranslationUiTest\setSiteInformation(), and t().

Here is the call graph for this function:

testSourceAndTargetLanguage ( )

Tests source and target language edge cases.

References WebTestBase\assertResponse(), TestBase\config(), WebTestBase\drupalGet(), WebTestBase\drupalLogin(), and LanguageInterface\LANGCODE_NOT_SPECIFIED.

Here is the call graph for this function:

testSourceValueDuplicateSave ( )

Tests the site information translation interface.

References TestBase\assertEqual(), WebTestBase\assertResponse(), TestBase\assertTrue(), WebTestBase\drupalGet(), WebTestBase\drupalLogin(), WebTestBase\drupalLogout(), WebTestBase\drupalPostForm(), Drupal\languageManager(), ConfigTranslationUiTest\setSiteInformation(), and t().

Here is the call graph for this function:

testViewsTranslationUI ( )

Tests the views translation interface.

References WebTestBase\assertResponse(), TestBase\assertTrue(), WebTestBase\clickLink(), Json\decode(), WebTestBase\drupalGet(), WebTestBase\drupalLogin(), WebTestBase\drupalPostForm(), ConfigTranslationUiTest\renderContextualLinks(), and t().

Here is the call graph for this function:

Field Documentation

$modules
static
Initial value:
= [
'block',
'config_translation',
'config_translation_test',
'contact',
'contact_test',
'contextual',
'entity_test',
'field_test',
'field_ui',
'filter',
'filter_test',
'node',
'views',
'views_ui',
]

The documentation for this class was generated from the following file: