You are here

protected function ContentTranslationUITestBase::getChangedFieldName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php \Drupal\content_translation\Tests\ContentTranslationUITestBase::getChangedFieldName()

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

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity being tested.

Return value

string The field name.

1 call to ContentTranslationUITestBase::getChangedFieldName()
ContentTranslationUITestBase::doTestTranslationChanged in core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php
Tests the basic translation workflow.

File

core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php, line 465
Contains \Drupal\content_translation\Tests\ContentTranslationUITestBase.

Class

ContentTranslationUITestBase
Tests the Content Translation UI.

Namespace

Drupal\content_translation\Tests

Code

protected function getChangedFieldName($entity) {
  return $entity
    ->hasField('content_translation_changed') ? 'content_translation_changed' : 'changed';
}