summaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/tests/Settings/AdminTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/updatenotification/tests/Settings/AdminTest.php')
-rw-r--r--apps/updatenotification/tests/Settings/AdminTest.php29
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 {
+
+}