diff options
author | Julius Knorr <jus@bitgrid.net> | 2024-09-17 22:38:44 +0200 |
---|---|---|
committer | Julius Knorr <jus@bitgrid.net> | 2024-09-20 14:53:34 +0200 |
commit | 606241caebda2e01702c0d08adbc35ace8d01f13 (patch) | |
tree | da9cc49d1079724a9192f89415c594b97db93aa9 /apps/updatenotification/tests | |
parent | 7ff911665e7507a800e05fe9cd80e0304cd11dbc (diff) | |
download | nextcloud-server-606241caebda2e01702c0d08adbc35ace8d01f13.tar.gz nextcloud-server-606241caebda2e01702c0d08adbc35ace8d01f13.zip |
chore(legacy): Introduce public version ct plass and drop version methods from OC_Utilclean/version-ocp
Signed-off-by: Julius Knorr <jus@bitgrid.net>
Diffstat (limited to 'apps/updatenotification/tests')
-rw-r--r-- | apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php b/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php index 3ebeb3d805d..61bacf9e0ac 100644 --- a/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php +++ b/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php @@ -20,10 +20,12 @@ use OCP\IGroupManager; use OCP\IUser; use OCP\Notification\IManager; use OCP\Notification\INotification; +use OCP\ServerVersion; use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class UpdateAvailableNotificationsTest extends TestCase { + private ServerVersion $serverVersion; private IConfig|MockObject $config; private IManager|MockObject $notificationManager; private IGroupManager|MockObject $groupManager; @@ -36,6 +38,7 @@ class UpdateAvailableNotificationsTest extends TestCase { protected function setUp(): void { parent::setUp(); + $this->serverVersion = $this->createMock(ServerVersion::class); $this->config = $this->createMock(IConfig::class); $this->appConfig = $this->createMock(IAppConfig::class); $this->notificationManager = $this->createMock(IManager::class); @@ -54,6 +57,7 @@ class UpdateAvailableNotificationsTest extends TestCase { if (empty($methods)) { return new UpdateAvailableNotifications( $this->timeFactory, + $this->serverVersion, $this->config, $this->appConfig, $this->notificationManager, @@ -67,6 +71,7 @@ class UpdateAvailableNotificationsTest extends TestCase { return $this->getMockBuilder(UpdateAvailableNotifications::class) ->setConstructorArgs([ $this->timeFactory, + $this->serverVersion, $this->config, $this->appConfig, $this->notificationManager, @@ -158,13 +163,12 @@ class UpdateAvailableNotificationsTest extends TestCase { */ public function testCheckCoreUpdate(string $channel, $versionCheck, $version, $readableVersion, $errorDays): void { $job = $this->getJob([ - 'getChannel', 'createNotifications', 'clearErrorNotifications', 'sendErrorNotifications', ]); - $job->expects($this->once()) + $this->serverVersion->expects($this->once()) ->method('getChannel') ->willReturn($channel); |