Problem/Motivation
#2226533: Changes to the Language class due to the LanguageInterface (followup) was
diff --git a/core/modules/language/src/Tests/LanguageUrlRewritingTest.php b/core/modules/language/src/Tests/LanguageUrlRewritingTest.php
index 3701fb9..94dcd2f 100644
--- a/core/modules/language/src/Tests/LanguageUrlRewritingTest.php
+++ b/core/modules/language/src/Tests/LanguageUrlRewritingTest.php
@@ -52,7 +53,7 @@ protected function setUp() {
function testUrlRewritingEdgeCases() {
// Check URL rewriting with a non-installed language.
$non_existing = \Drupal::languageManager()->getDefaultLanguage();
- $non_existing->id = $this->randomMachineName();
+ $non_existing->setId($this->randomMachineName());
$this->checkUrl($non_existing, 'Path language is ignored if language is not installed.', 'URL language negotiation does not work with non-installed languages');
// Check that URL rewriting is not applied to subrequests.
but there is no setId()
Proposed resolution
handle this better, maybe in the create/new passing to the constructor.
Remaining tasks
User interface changes
No.
API changes
No.
Comment | File | Size | Author |
---|---|---|---|
#4 | languageUrl-2337859-4.patch | 1.11 KB | martin107 |
#4 | interdiff-3-4.txt | 639 bytes | martin107 |
#3 | languageUrl-2337859-3.patch | 1.13 KB | martin107 |
Comments
Comment #1
YesCT CreditAttribution: YesCT commentedComment #2
martin107 CreditAttribution: martin107 commentedI am looking at this now..
but first I have a nit-pick to be removed as a separate issue. :)
Comment #3
martin107 CreditAttribution: martin107 commentedAdopting the much cleaner way of overriding the defaults when constructing a new language.
LanguageUrlRewritingTest.php passes locally for me.
Comment #4
martin107 CreditAttribution: martin107 commentedand after a little nudging, by the eagle eyed YesCT... I eventually do the right thing :)
Comment #5
YesCT CreditAttribution: YesCT commentedsuper.
Comment #6
alexpottCommitted f6d2f23 and pushed to 8.0.x. Thanks!
Comment #9
YesCT CreditAttribution: YesCT commentedI *think* the testbot tried to retest this since it was rtbc, but .. alexpott had just committed it, so it did not apply? It was green...