diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php index 20db007..dd2ed0c 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php @@ -20,6 +20,13 @@ class TermTranslationUITest extends EntityTranslationUITest { protected $name; /** + * The vocabulary used for creating terms. + * + * @var \Drupal\taxonomy\Plugin\Core\Entity\Vocabulary + */ + protected $vocabulary; + + /** * Modules to enable. * * @var array diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php index 7f263a9..eac0b7f 100644 --- a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php +++ b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php @@ -232,7 +232,8 @@ function testTranslationUI() { * @param string $langcode * The initial language code of the entity. * @param string $bundle_name - * (optional) Entity bundle if entity has bundles. Default to $this->bundle. + * (optional) The entity bundle, if the entity uses bundles. Defaults to + * NULL. If left NULL, $this->bundle will be used. * * @return * The entity id. @@ -242,7 +243,7 @@ protected function createEntity($values, $langcode, $bundle_name = NULL) { $entity_values['langcode'] = $langcode; $info = entity_get_info($this->entityType); if (!empty($info['entity_keys']['bundle'])) { - $entity_values[$info['entity_keys']['bundle']] = isset($bundle_name) ? $bundle_name : $this->bundle; + $entity_values[$info['entity_keys']['bundle']] = $bundle_name ?: $this->bundle; } $controller = entity_get_controller($this->entityType); if (!($controller instanceof DatabaseStorageControllerNG)) { @@ -282,7 +283,7 @@ protected function getEditValues($values, $langcode, $new = FALSE) { /** * Returns the translation object to use to retrieve the translated values. * - * @param \Drupal\Core\Enitity\EntityInterface $entity + * @param \Drupal\Core\Entity\EntityInterface $entity * The entity being tested. * @param string $langcode * The language code identifying the translation to be retrieved.