diff --git a/core/lib/Drupal/Core/Language/Language.php b/core/lib/Drupal/Core/Language/Language.php index b003f1c..8bff839 100644 --- a/core/lib/Drupal/Core/Language/Language.php +++ b/core/lib/Drupal/Core/Language/Language.php @@ -44,7 +44,7 @@ class Language implements LanguageInterface { * * @var string */ - protected $id = ''; + public $id = ''; /** * The direction, left-to-right, or right-to-left. diff --git a/core/modules/system/src/Tests/Entity/EntityTranslationTest.php b/core/modules/system/src/Tests/Entity/EntityTranslationTest.php index a861984..d7fad64 100644 --- a/core/modules/system/src/Tests/Entity/EntityTranslationTest.php +++ b/core/modules/system/src/Tests/Entity/EntityTranslationTest.php @@ -442,7 +442,7 @@ function testEntityTranslationAPI() { * Tests language fallback applied to field and entity translations. */ function testLanguageFallback() { - $current_langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId(); + $current_langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->id; $this->langcodes[] = $current_langcode; $values = array(); @@ -466,21 +466,21 @@ function testLanguageFallback() { // Check that retrieveing the current translation works as expected. $entity = $this->reloadEntity($entity); $translation = $this->entityManager->getTranslationFromContext($entity, $langcode2); - $this->assertEqual($translation->language()->getId(), $default_langcode, 'The current translation language matches the expected one.'); + $this->assertEqual($translation->language()->id, $default_langcode, 'The current translation language matches the expected one.'); // Check that language fallback respects language weight by default. $languages = $this->languageManager->getLanguages(); $languages[$langcode]->setWeight(-1); language_save($languages[$langcode]); $translation = $this->entityManager->getTranslationFromContext($entity, $langcode2); - $this->assertEqual($translation->language()->getId(), $langcode, 'The current translation language matches the expected one.'); + $this->assertEqual($translation->language()->id, $langcode, 'The current translation language matches the expected one.'); // Check that the current translation is properly returned. $translation = $this->entityManager->getTranslationFromContext($entity); - $this->assertEqual($langcode, $translation->language()->getId(), 'The current translation language matches the topmost language fallback candidate.'); + $this->assertEqual($langcode, $translation->language()->id, 'The current translation language matches the topmost language fallback candidate.'); $entity->addTranslation($current_langcode, $values[$current_langcode]); $translation = $this->entityManager->getTranslationFromContext($entity); - $this->assertEqual($current_langcode, $translation->language()->getId(), 'The current translation language matches the current language.'); + $this->assertEqual($current_langcode, $translation->language()->id, 'The current translation language matches the current language.'); // Check that if the entity has no translation no fallback is applied. $entity2 = $controller->create(array('langcode' => $default_langcode)); diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh index 16b29ca..6f5795b 100644 --- a/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -67,7 +67,8 @@ exit; } -$test_list = simpletest_script_get_test_list(); +// $test_list = simpletest_script_get_test_list(); +$test_list = array_fill(0,50,'\Drupal\system\Tests\Entity\EntityTranslationTest'); // Try to allocate unlimited time to run the tests. drupal_set_time_limit(0);