diff --git a/core/modules/comment/src/Tests/CommentTypeTest.php b/core/modules/comment/src/Tests/CommentTypeTest.php index 7005bc1..4e75006 100644 --- a/core/modules/comment/src/Tests/CommentTypeTest.php +++ b/core/modules/comment/src/Tests/CommentTypeTest.php @@ -83,7 +83,7 @@ public function testCommentTypeCreation() { $this->assertTrue($comment_type, 'The new comment type has been created.'); // Check that the comment type was created in site default language. - $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->id; + $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId(); $this->assertEqual($comment_type->langcode, $default_langcode); } diff --git a/core/modules/system/src/Tests/Entity/EntityFieldDefaultValueTest.php b/core/modules/system/src/Tests/Entity/EntityFieldDefaultValueTest.php index 61b9aae..1e7af85 100644 --- a/core/modules/system/src/Tests/Entity/EntityFieldDefaultValueTest.php +++ b/core/modules/system/src/Tests/Entity/EntityFieldDefaultValueTest.php @@ -67,7 +67,7 @@ public function testDefaultValueCallback() { $entity = $this->entityManager->getStorage('entity_test_default_value')->create(); // The description field has a default value callback for testing, see // entity_test_field_default_value(). - $this->assertEqual($entity->description->value, 'description_' . $entity->language()->id); + $this->assertEqual($entity->description->value, 'description_' . $entity->language()->getId()); } } diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module index 912dc7d..a18d92e 100644 --- a/core/modules/system/tests/modules/entity_test/entity_test.module +++ b/core/modules/system/tests/modules/entity_test/entity_test.module @@ -430,7 +430,7 @@ function entity_test_entity_test_mul_translation_delete(EntityInterface $transla * @see \Drupal\field\Entity\FieldInstanceConfig::$default_value */ function entity_test_field_default_value(ContentEntityInterface $entity, FieldDefinitionInterface $definition) { - return array(array('value' => $definition->getName() . '_' . $entity->language()->id)); + return array(array('value' => $definition->getName() . '_' . $entity->language()->getId())); } /**