Chris@0: save(); Chris@0: $this->config('system.site')->set('default_langcode', 'fr')->save(); Chris@0: Chris@0: $this->drupalLogin($this->rootUser); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Tests that there are no circular dependencies. Chris@0: */ Chris@0: public function testCircularDependency() { Chris@0: // Ensure that we can enable early_translation_test on a non-english site. Chris@0: $this->drupalPostForm('admin/modules', ['modules[early_translation_test][enable]' => TRUE], t('Install')); Chris@0: $this->assertResponse(200); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Test language fallback defaults. Chris@0: */ Chris@0: public function testLanguageFallbackDefaults() { Chris@0: $this->drupalGet(''); Chris@0: // Ensure state of fallback languages persisted by Chris@0: // locale_test_language_fallback_candidates_locale_lookup_alter() is empty. Chris@0: $this->assertEqual(\Drupal::state()->get('locale.test_language_fallback_candidates_locale_lookup_alter_candidates'), []); Chris@0: // Make sure there is enough information provided for alter hooks. Chris@0: $context = \Drupal::state()->get('locale.test_language_fallback_candidates_locale_lookup_alter_context'); Chris@0: $this->assertEqual($context['langcode'], 'fr'); Chris@0: $this->assertEqual($context['operation'], 'locale_lookup'); Chris@0: } Chris@0: Chris@0: }