- 🇺🇸United States smustgrave
This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request → as a guide.
Previously tagged for tests in #13 which still need to happen.
- 🇮🇳India anup.sinha Bengaluru
Hi All,
As per my analysis, we have to modify the below test method.
File - \core\modules\user\tests\src\Unit\Plugin\Core\Entity\UserTest.php
Test Function Name - testUserGetRoles()But the problem here is that the authenticated/anonymous role is being set through the createUserSession() method not testUserGetRoles() method. So we have to modify the parameters of the createUserSession() function like below and set the anonymous role only when it is set. But then I have to modify the arguments in the parent class UserSessionTest as well.
protected function createUserSession(array $rids = [], $authenticated = FALSE, $anonymous = FALSE) {
$id = '';
if ($authenticated) {
$id = 2;
}
elseif ($anonymous) {
$id = 0;
}So just wanted to check if anyone has a better solution to add the test coverage for this change.
Thanks & Regards,
Anup