diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-07-18 11:21:03 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-08-08 17:03:51 +0200 |
commit | 49334e4d9c278d33ce9fd4195b5a12af99821be2 (patch) | |
tree | 45ffe11ad48be373ad7a46f4214d285b18a7670e /apps/updatenotification | |
parent | 48d9c4d2b093e12ec3bf3cd29295da0f2277028f (diff) | |
download | nextcloud-server-49334e4d9c278d33ce9fd4195b5a12af99821be2.tar.gz nextcloud-server-49334e4d9c278d33ce9fd4195b5a12af99821be2.zip |
Fix many tests and warnings
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/updatenotification')
-rw-r--r-- | apps/updatenotification/tests/Settings/AdminTest.php | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/apps/updatenotification/tests/Settings/AdminTest.php b/apps/updatenotification/tests/Settings/AdminTest.php index 852504fb45a..489679dfabd 100644 --- a/apps/updatenotification/tests/Settings/AdminTest.php +++ b/apps/updatenotification/tests/Settings/AdminTest.php @@ -36,13 +36,16 @@ use OCP\IConfig; use OCP\IDateTimeFormatter; use OCP\IGroup; use OCP\IGroupManager; +use OCP\IUserManager; use OCP\L10N\IFactory; use OCP\L10N\ILanguageIterator; use OCP\Support\Subscription\IRegistry; +use OCP\UserInterface; +use OCP\User\Backend\ICountUsersBackend; use OCP\Util; -use Test\TestCase; -use OCP\IUserManager; +use OC\User\Backend; use Psr\Log\LoggerInterface; +use Test\TestCase; class AdminTest extends TestCase { /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */ @@ -89,9 +92,9 @@ class AdminTest extends TestCase { } public function testGetFormWithUpdate() { - $backend1 = $this->createMock(UserInterface::class); - $backend2 = $this->createMock(UserInterface::class); - $backend3 = $this->createMock(UserInterface::class); + $backend1 = $this->createMock(CountUsersBackend::class); + $backend2 = $this->createMock(CountUsersBackend::class); + $backend3 = $this->createMock(CountUsersBackend::class); $backend1 ->expects($this->once()) ->method('implementsActions') @@ -213,9 +216,9 @@ class AdminTest extends TestCase { } public function testGetFormWithUpdateAndChangedUpdateServer() { - $backend1 = $this->createMock(UserInterface::class); - $backend2 = $this->createMock(UserInterface::class); - $backend3 = $this->createMock(UserInterface::class); + $backend1 = $this->createMock(CountUsersBackend::class); + $backend2 = $this->createMock(CountUsersBackend::class); + $backend3 = $this->createMock(CountUsersBackend::class); $backend1 ->expects($this->once()) ->method('implementsActions') @@ -337,9 +340,9 @@ class AdminTest extends TestCase { } public function testGetFormWithUpdateAndCustomersUpdateServer() { - $backend1 = $this->createMock(UserInterface::class); - $backend2 = $this->createMock(UserInterface::class); - $backend3 = $this->createMock(UserInterface::class); + $backend1 = $this->createMock(CountUsersBackend::class); + $backend2 = $this->createMock(CountUsersBackend::class); + $backend3 = $this->createMock(CountUsersBackend::class); $backend1 ->expects($this->once()) ->method('implementsActions') @@ -543,3 +546,7 @@ class AdminTest extends TestCase { $this->assertSame($expectation, $result); } } + +abstract class CountUsersBackend implements UserInterface, ICountUsersBackend { + +} |