function UserMailNotifyTest::testUserMailNotifyLangcodeDeprecation
Tests the deprecated $langcode argument to _user_mail_notify().
@group legacy
File
-
core/
modules/ user/ tests/ src/ Kernel/ UserMailNotifyTest.php, line 116
Class
- UserMailNotifyTest
- Tests _user_mail_notify() use of user.settings.notify.*.
Namespace
Drupal\Tests\user\KernelCode
public function testUserMailNotifyLangcodeDeprecation() {
$account = $this->createUser();
$this->expectDeprecation('Specifying the notification language using the $langcode parameter is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Omit the parameter. See https://www.drupal.org/node/3187082');
_user_mail_notify('password_reset', $account, $account->getPreferredLangcode());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.