function ShortcutTranslationUITest::doTestTranslationChanged

Same name and namespace in other branches
  1. 8.9.x core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php \Drupal\Tests\shortcut\Functional\ShortcutTranslationUITest::doTestTranslationChanged()
  2. 10 core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php \Drupal\Tests\shortcut\Functional\ShortcutTranslationUITest::doTestTranslationChanged()
  3. 11.x core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php \Drupal\Tests\shortcut\Functional\ShortcutTranslationUITest::doTestTranslationChanged()

Tests the basic translation workflow.

Overrides ContentTranslationUITestBase::doTestTranslationChanged

File

core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php, line 115

Class

ShortcutTranslationUITest
Tests the shortcut translation UI.

Namespace

Drupal\Tests\shortcut\Functional

Code

protected function doTestTranslationChanged() {
    $storage = $this->container
        ->get('entity_type.manager')
        ->getStorage($this->entityTypeId);
    $storage->resetCache([
        $this->entityId,
    ]);
    $entity = $storage->load($this->entityId);
    $this->assertFalse($entity instanceof EntityChangedInterface, new FormattableMarkup('%entity is not implementing EntityChangedInterface.', [
        '%entity' => $this->entityTypeId,
    ]));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.