Problem/Motivation
Noticed by @alexpott in #2340667-45: Protect Drupal\Core\Language\Language::id, and use getId()
+++ b/core/modules/user/src/Tests/UserInstallTest.php
@@ -47,8 +47,8 @@ public function testUserInstall() {
- $this->assertEqual($anon->langcode, \Drupal::languageManager()->getDefaultLanguage()->id);
- $this->assertEqual($admin->langcode, \Drupal::languageManager()->getDefaultLanguage()->id);
+ $this->assertEqual($anon->langcode, \Drupal::languageManager()->getDefaultLanguage()->getId(), 'Anon user language is the default.');
+ $this->assertEqual($admin->langcode, \Drupal::languageManager()->getDefaultLanguage()->getId(), 'Admin user language is the default.');
The test assertion message here is less useful to a developer than the default - which would tell you what the two langcodes are.
Proposed resolution
Take out the custom assert message.
Remaining tasks
Contributor tasks needed
| Task |
Novice task? |
Contributor instructions |
Complete? |
| Create a patch |
(novice) |
Instructions |
|
| Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards |
|
Instructions |
|
User interface changes
No.
API changes
No.
Comments
Comment #1
yesct commentedComment #2
lhangea commentedComment #3
lhangea commentedI will write and upload the patch with the correction in a few minutes :)
Comment #4
lhangea commentedhere's the patch
Comment #5
lhangea commentedComment #6
skipyT commentedthis seems ok for me. thanks Lucian!
Comment #7
rahul.shindeComment #8
yesct commentedThanks.
Let's leave this unassigned since I think there is nothing actionable right now.
Comment #10
webchickCommitted and pushed to 8.0.x. Thanks!