Skip to content

Commit 5a4d60f

Browse files
committed
fixed phpstan error -3
1 parent 5ff6650 commit 5a4d60f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tests/Authentication/ForcePasswordResetTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ public function testForceGlobalPasswordReset(): void
121121
* @phpstan-var UserIdentityModel
122122
*/
123123
$identities = model(UserIdentityModel::class);
124+
$identities->forceGlobalPasswordReset();
124125

125-
$this->assertNotFalse($identities->forceGlobalPasswordReset());
126126
$this->assertTrue($user->requiresPasswordReset());
127127
}
128128
}

tests/Unit/UserIdentityModelTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ public function testForceMultiplePasswordReset(): void
9393
$userIds[] = $row->user_id;
9494
}
9595

96-
$this->assertNotFalse($identities->forceMultiplePasswordReset($userIds));
96+
$identities->forceMultiplePasswordReset($userIds);
97+
98+
/**
99+
* @phpstan-var UserModel
100+
*/
101+
$users = model(UserModel::class);
102+
$first_user = $users->findById($userIds[0]);
103+
$last_user = $users->findById($userIds[9]);
104+
105+
$this->assertTrue($first_user->requiresPasswordReset());
106+
$this->assertTrue($last_user->requiresPasswordReset());
97107
}
98108
}

0 commit comments

Comments
 (0)