comparison core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children af1871eacc83
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
72 // language-url. 72 // language-url.
73 $config = $this->config('language.types'); 73 $config = $this->config('language.types');
74 $config->set('configurable', [LanguageInterface::TYPE_INTERFACE, LanguageInterface::TYPE_CONTENT]); 74 $config->set('configurable', [LanguageInterface::TYPE_INTERFACE, LanguageInterface::TYPE_CONTENT]);
75 $config->set('negotiation.language_content.enabled', [ 75 $config->set('negotiation.language_content.enabled', [
76 LanguageNegotiationContentEntity::METHOD_ID => 0, 76 LanguageNegotiationContentEntity::METHOD_ID => 0,
77 LanguageNegotiationUrl::METHOD_ID => 1 77 LanguageNegotiationUrl::METHOD_ID => 1,
78 ]); 78 ]);
79 $config->save(); 79 $config->save();
80 80
81 // Without being on an content entity route the default entity URL tests 81 // Without being on an content entity route the default entity URL tests
82 // should still pass. 82 // should still pass.
96 // Define the method language-url with a higher priority than 96 // Define the method language-url with a higher priority than
97 // language-content-entity. This configuration should match the default one, 97 // language-content-entity. This configuration should match the default one,
98 // where the language-content-entity is turned off. 98 // where the language-content-entity is turned off.
99 $config->set('negotiation.language_content.enabled', [ 99 $config->set('negotiation.language_content.enabled', [
100 LanguageNegotiationUrl::METHOD_ID => 0, 100 LanguageNegotiationUrl::METHOD_ID => 0,
101 LanguageNegotiationContentEntity::METHOD_ID => 1 101 LanguageNegotiationContentEntity::METHOD_ID => 1,
102 ]); 102 ]);
103 $config->save(); 103 $config->save();
104 104
105 // The default entity URL tests should pass again with the current 105 // The default entity URL tests should pass again with the current
106 // configuration. 106 // configuration.