comparison core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
2 2
3 namespace Drupal\Tests\locale\Functional; 3 namespace Drupal\Tests\locale\Functional;
4 4
5 use Drupal\language\Entity\ConfigurableLanguage; 5 use Drupal\language\Entity\ConfigurableLanguage;
6 use Drupal\Tests\BrowserTestBase; 6 use Drupal\Tests\BrowserTestBase;
7 use Drupal\Tests\RequirementsPageTrait;
7 8
8 /** 9 /**
9 * Adds and configures languages to check field schema definition. 10 * Adds and configures languages to check field schema definition.
10 * 11 *
11 * @group locale 12 * @group locale
12 */ 13 */
13 class LocaleTranslatedSchemaDefinitionTest extends BrowserTestBase { 14 class LocaleTranslatedSchemaDefinitionTest extends BrowserTestBase {
15
16 use RequirementsPageTrait;
14 17
15 /** 18 /**
16 * Modules to enable. 19 * Modules to enable.
17 * 20 *
18 * @var array 21 * @var array
24 */ 27 */
25 protected function setUp() { 28 protected function setUp() {
26 parent::setUp(); 29 parent::setUp();
27 ConfigurableLanguage::createFromLangcode('fr')->save(); 30 ConfigurableLanguage::createFromLangcode('fr')->save();
28 $this->config('system.site')->set('default_langcode', 'fr')->save(); 31 $this->config('system.site')->set('default_langcode', 'fr')->save();
29 // Make sure new entity type definitions are processed. 32
30 \Drupal::service('entity.definition_update_manager')->applyUpdates();
31 // Clear all caches so that the base field definition, its cache in the 33 // Clear all caches so that the base field definition, its cache in the
32 // entity manager, the t() cache, etc. are all cleared. 34 // entity manager, the t() cache, etc. are all cleared.
33 drupal_flush_all_caches(); 35 drupal_flush_all_caches();
34 } 36 }
35 37
82 84
83 // Ensure that there are no updates just due to translations. Check for 85 // Ensure that there are no updates just due to translations. Check for
84 // markup and a link instead of specific text because text may be 86 // markup and a link instead of specific text because text may be
85 // translated. 87 // translated.
86 $this->drupalGet($update_url . '/selection', ['external' => TRUE]); 88 $this->drupalGet($update_url . '/selection', ['external' => TRUE]);
89 $this->updateRequirementsProblem();
90 $this->drupalGet($update_url . '/selection', ['external' => TRUE]);
87 $this->assertRaw('messages--status', 'No pending updates.'); 91 $this->assertRaw('messages--status', 'No pending updates.');
88 $this->assertNoLinkByHref('fr/update.php/run', 'No link to run updates.'); 92 $this->assertNoLinkByHref('fr/update.php/run', 'No link to run updates.');
89 } 93 }
90 94
91 } 95 }