diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-13 12:59:51 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-05-20 17:14:58 +0200 |
commit | 9ec0cb0a90ecdc7f4181ce8399bfe0c3a35842a2 (patch) | |
tree | f7e566b31eaa96a1834881043a939eaae45e4495 /tests | |
parent | eb45a6ca404524bad6416ba3b3a755f9faa5e9b8 (diff) | |
download | nextcloud-server-9ec0cb0a90ecdc7f4181ce8399bfe0c3a35842a2.tar.gz nextcloud-server-9ec0cb0a90ecdc7f4181ce8399bfe0c3a35842a2.zip |
Fix psalm issues related to the user backend
- Reflect the actual return value returned by the implementation in the
the interface. E.g. IUser|bool -> IUser|false
- Remove $hasLoggedIn parameter from private countUser implementation.
Replace the two call with the equivalent countSeenUser
- getBackend is nuallable, add this to the interface
- Use backend interface to make psalm happy about call to undefined
methods. Also helps with getting rid at some point of the old
implementActions
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/User/ManagerTest.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php index c8c1430d583..2536eee8441 100644 --- a/tests/lib/User/ManagerTest.php +++ b/tests/lib/User/ManagerTest.php @@ -609,7 +609,7 @@ class ManagerTest extends TestCase { public function testCountUsersOnlySeen() { $manager = \OC::$server->getUserManager(); // count other users in the db before adding our own - $countBefore = $manager->countUsers(true); + $countBefore = $manager->countSeenUsers(); //Add test users $user1 = $manager->createUser('testseencount1', 'testseencount1'); @@ -623,7 +623,7 @@ class ManagerTest extends TestCase { $user4 = $manager->createUser('testseencount4', 'testseencount4'); $user4->updateLastLoginTimestamp(); - $this->assertEquals($countBefore + 3, $manager->countUsers(true)); + $this->assertEquals($countBefore + 3, $manager->countSeenUsers()); //cleanup $user1->delete(); |