Unverified Commit f0e91159 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3072929 by id.aleks, iyyappan.govind, amateescu, Wim Leers: Remove...

Issue #3072929 by id.aleks, iyyappan.govind, amateescu, Wim Leers: Remove declaration of the default translation handler from entity type annotations
parent d37aea09
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@
 *       "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm",
 *       "delete-multiple-confirm" = "Drupal\Core\Entity\Form\DeleteMultipleForm",
 *     },
 *     "translation" = "Drupal\content_translation\ContentTranslationHandler",
 *     "views_data" = "Drupal\media\MediaViewsData",
 *     "route_provider" = {
 *       "html" = "Drupal\media\Routing\MediaRouteProvider",
+6 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@

use Drupal\Component\Render\FormattableMarkup;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\content_translation\ContentTranslationHandler;

/**
 * Tests multilanguage fields logic.
@@ -17,7 +18,7 @@ class MediaTranslationTest extends MediaKernelTestBase {
   *
   * @var array
   */
  public static $modules = ['language'];
  public static $modules = ['language' , 'content_translation'];

  /**
   * The test media translation type.
@@ -55,6 +56,10 @@ public function testTranslatableFieldSaveLoad() {
    $entity_type = $this->container->get('entity_type.manager')->getDefinition('media');
    $this->assertTrue($entity_type->isTranslatable(), 'Media is translatable.');

    // Check if the translation handler uses the content_translation handler.
    $translation_handler_class = $entity_type->getHandlerClass('translation');
    $this->assertEquals(ContentTranslationHandler::class, $translation_handler_class, 'Translation handler is set to use the content_translation handler.');

    // Prepare the field translations.
    $source_field_definition = $this->testTranslationMediaType->getSource()->getSourceFieldDefinition($this->testTranslationMediaType);
    $source_field_storage = $source_field_definition->getFieldStorageDefinition();
+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@
 *       "edit" = "Drupal\shortcut\ShortcutForm",
 *       "delete" = "Drupal\shortcut\Form\ShortcutDeleteForm"
 *     },
 *     "translation" = "Drupal\content_translation\ContentTranslationHandler"
 *   },
 *   base_table = "shortcut",
 *   data_table = "shortcut_field_data",
+0 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
 *     "route_provider" = {
 *       "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider",
 *     },
 *     "translation" = "Drupal\content_translation\ContentTranslationHandler",
 *     "views_data" = "Drupal\entity_test\EntityTestViewsData"
 *   },
 *   base_table = "entity_test",
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
 *       "default" = "Drupal\entity_test\EntityTestForm",
 *       "delete" = "Drupal\entity_test\EntityTestDeleteForm"
 *     },
 *     "translation" = "Drupal\content_translation\ContentTranslationHandler",
 *     "views_data" = "Drupal\views\EntityViewsData",
 *     "route_provider" = {
 *       "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider",
Loading