Drupal 8  8.0.2
ContentTranslationUITestBase Class Reference
Inheritance diagram for ContentTranslationUITestBase:

Public Member Functions

 testTranslationUI ()
 
 doTestChangedTimeAfterSaveWithoutChanges ()
 
- 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 ()
 

Protected Member Functions

 doTestBasicTranslation ()
 
 doTestTranslationOverview ()
 
 doTestOutdatedStatus ()
 
 doTestPublishedStatus ()
 
 doTestAuthoringInfo ()
 
 doTestTranslationDeletion ()
 
 getNewEntityValues ($langcode)
 
 getEditValues ($values, $langcode, $new=FALSE)
 
 getFormSubmitActionForNewTranslation (EntityInterface $entity, $langcode)
 
 getFormSubmitAction (EntityInterface $entity, $langcode)
 
 getFormSubmitSuffix (EntityInterface $entity, $langcode)
 
 getTranslation (EntityInterface $entity, $langcode)
 
 getValue (EntityInterface $translation, $property, $langcode)
 
 getChangedFieldName ($entity)
 
 doTestTranslationEdit ()
 
 doTestTranslationChanged ()
 
- Protected Member Functions inherited from ContentTranslationTestBase
 setUp ()
 
 setupLanguages ()
 
 getTranslatorPermissions ()
 
 getTranslatePermission ()
 
 getEditorPermissions ()
 
 getAdministratorPermissions ()
 
 setupUsers ()
 
 setupBundle ()
 
 enableTranslation ()
 
 setupTestFields ()
 
 createEntity ($values, $langcode, $bundle_name=NULL)
 
- 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

 $entityId
 
 $testLanguageSelector = TRUE
 
 $testHTMLEscapeForAllLanguages = FALSE
 
 $defaultCacheContexts = ['languages:language_interface', 'theme', 'url.query_args:_wrapper_format', 'user.permissions']
 
- Protected Attributes inherited from ContentTranslationTestBase
 $entityTypeId = 'entity_test_mul'
 
 $bundle
 
 $langcodes
 
 $translator
 
 $editor
 
 $administrator
 
 $fieldName
 
 $controller
 
 $manager
 
- 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 Public Attributes inherited from ContentTranslationTestBase
static $modules = array('text')
 
- Static Protected Attributes inherited from TestBase
static $configSchemaCheckerExclusions
 

Detailed Description

Tests the Content Translation UI.

Member Function Documentation

doTestAuthoringInfo ( )
protected

Tests the translation authoring information.

References TestBase\assertEqual(), TestBase\assertTrue(), WebTestBase\drupalPostForm(), format_date(), ContentTranslationUITestBase\getFormSubmitAction(), and Entity\load().

Referenced by ContentTranslationUITestBase\testTranslationUI().

Here is the call graph for this function:

Here is the caller graph for this function:

doTestBasicTranslation ( )
protected
doTestChangedTimeAfterSaveWithoutChanges ( )

Test the changed time after API and FORM save without changes.

Referenced by ContentTranslationUITestBase\testTranslationUI().

Here is the caller graph for this function:

doTestOutdatedStatus ( )
protected

Tests up-to-date status tracking.

References TestBase\assertFalse(), TestBase\assertTrue(), WebTestBase\drupalGet(), WebTestBase\drupalPostForm(), ContentTranslationUITestBase\getFormSubmitAction(), Drupal\languageManager(), and Entity\load().

Referenced by ContentTranslationUITestBase\testTranslationUI().

Here is the call graph for this function:

Here is the caller graph for this function:

doTestPublishedStatus ( )
protected

Tests the translation publishing status.

References TestBase\assertFalse(), WebTestBase\drupalGet(), WebTestBase\drupalPostForm(), ContentTranslationUITestBase\getFormSubmitAction(), and Entity\load().

Referenced by ContentTranslationUITestBase\testTranslationUI().

Here is the call graph for this function:

Here is the caller graph for this function:

doTestTranslationChanged ( )
protected

Tests the basic translation workflow.

References format_string().

Referenced by ContentTranslationUITestBase\testTranslationUI().

Here is the call graph for this function:

Here is the caller graph for this function:

doTestTranslationDeletion ( )
protected

Tests translation deletion.

References WebTestBase\assertResponse(), TestBase\assertTrue(), WebTestBase\drupalGet(), WebTestBase\drupalLogin(), WebTestBase\drupalPostForm(), Url\fromRoute(), Entity\load(), and t().

Referenced by ContentTranslationUITestBase\testTranslationUI().

Here is the call graph for this function:

Here is the caller graph for this function:

doTestTranslationEdit ( )
protected

Tests edit content translation.

Referenced by ContentTranslationUITestBase\testTranslationUI().

Here is the caller graph for this function:

doTestTranslationOverview ( )
protected

Tests that the translation overview shows the correct values.

References TestBase\assertEqual(), WebTestBase\drupalGet(), format_string(), and t().

Referenced by ContentTranslationUITestBase\testTranslationUI().

Here is the call graph for this function:

Here is the caller graph for this function:

getChangedFieldName (   $entity)
protected

Returns the name of the field that implements the changed timestamp.

Parameters
\Drupal\Core\Entity\EntityInterface$entityThe entity being tested.
Returns
string The field name.
getEditValues (   $values,
  $langcode,
  $new = FALSE 
)
protected

Returns an edit array containing the values to be posted.

References LanguageInterface\LANGCODE_NOT_SPECIFIED.

Referenced by ContentTranslationUITestBase\doTestBasicTranslation(), and NodeTranslationUITest\testPublishedStatusNoFields().

Here is the caller graph for this function:

getFormSubmitAction ( EntityInterface  $entity,
  $langcode 
)
protected

Returns the form action value to be used to submit the entity form.

Parameters
\Drupal\Core\Entity\EntityInterface$entityThe entity being tested.
string$langcodeLanguage code for the form.
Returns
string Name of the button to hit.

References ContentTranslationUITestBase\getFormSubmitSuffix(), and t().

Referenced by CommentTranslationUITest\doTestAuthoringInfo(), ContentTranslationUITestBase\doTestAuthoringInfo(), ContentTranslationUITestBase\doTestOutdatedStatus(), CommentTranslationUITest\doTestPublishedStatus(), ContentTranslationUITestBase\doTestPublishedStatus(), and ContentTranslationUITestBase\getFormSubmitActionForNewTranslation().

Here is the call graph for this function:

Here is the caller graph for this function:

getFormSubmitActionForNewTranslation ( EntityInterface  $entity,
  $langcode 
)
protected

Returns the form action value when submitting a new translation.

Parameters
\Drupal\Core\Entity\EntityInterface$entityThe entity being tested.
string$langcodeLanguage code for the form.
Returns
string Name of the button to hit.

References ContentTranslationUITestBase\getFormSubmitAction(), and EntityInterface\toArray().

Referenced by ContentTranslationUITestBase\doTestBasicTranslation().

Here is the call graph for this function:

Here is the caller graph for this function:

getFormSubmitSuffix ( EntityInterface  $entity,
  $langcode 
)
protected

Returns appropriate submit button suffix based on translatability.

Parameters
\Drupal\Core\Entity\EntityInterface$entityThe entity being tested.
string$langcodeLanguage code for the form.
Returns
string Submit button suffix based on translatability.

Referenced by ContentTranslationUITestBase\getFormSubmitAction().

Here is the caller graph for this function:

getNewEntityValues (   $langcode)
protected

Returns an array of entity field values to be tested.

Referenced by ContentTranslationUITestBase\doTestBasicTranslation().

Here is the caller graph for this function:

getTranslation ( EntityInterface  $entity,
  $langcode 
)
protected

Returns the translation object to use to retrieve the translated values.

Parameters
\Drupal\Core\Entity\EntityInterface$entityThe entity being tested.
string$langcodeThe language code identifying the translation to be retrieved.
Returns
The translation object to act on.

Referenced by ContentTranslationUITestBase\doTestBasicTranslation().

Here is the caller graph for this function:

getValue ( EntityInterface  $translation,
  $property,
  $langcode 
)
protected

Returns the value for the specified property in the given language.

Parameters
\Drupal\Core\Entity\EntityInterface$translationThe translation object the property value should be retrieved from.
string$propertyThe property name.
string$langcodeThe property value.
Returns
The property value.

Referenced by ContentTranslationUITestBase\doTestBasicTranslation().

Here is the caller graph for this function:


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