diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-06-28 22:16:47 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-06-29 09:11:04 +0200 |
commit | 241b59f458163aa4612e8d42ede87e60a7729421 (patch) | |
tree | 15a3377131c52103023579d220d4bbb9c3c2f816 /apps/updatenotification/tests | |
parent | 6044733b2d79a0178163ec1f5355b559e24a0753 (diff) | |
download | nextcloud-server-241b59f458163aa4612e8d42ede87e60a7729421.tar.gz nextcloud-server-241b59f458163aa4612e8d42ede87e60a7729421.zip |
adjust tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/updatenotification/tests')
-rw-r--r-- | apps/updatenotification/tests/Settings/AdminTest.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/apps/updatenotification/tests/Settings/AdminTest.php b/apps/updatenotification/tests/Settings/AdminTest.php index ed9614a3b6b..d0d53226490 100644 --- a/apps/updatenotification/tests/Settings/AdminTest.php +++ b/apps/updatenotification/tests/Settings/AdminTest.php @@ -32,10 +32,16 @@ use OCP\IConfig; use OCP\IDateTimeFormatter; use OCP\IGroup; use OCP\IGroupManager; +use OCP\IUserSession; +use OCP\L10N\IFactory; use OCP\Util; use Test\TestCase; class AdminTest extends TestCase { + /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + protected $userSession; + /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */ + protected $l10nFactory; /** @var Admin */ private $admin; /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ @@ -54,12 +60,11 @@ class AdminTest extends TestCase { $this->updateChecker = $this->createMock(UpdateChecker::class); $this->groupManager = $this->createMock(IGroupManager::class); $this->dateTimeFormatter = $this->createMock(IDateTimeFormatter::class); + $this->userSession = $this->createMock(IUserSession::class); + $this->l10nFactory = $this->createMock(IFactory::class); $this->admin = new Admin( - $this->config, - $this->updateChecker, - $this->groupManager, - $this->dateTimeFormatter + $this->config, $this->updateChecker, $this->groupManager, $this->dateTimeFormatter, $this->userSession, $this->l10nFactory ); } @@ -99,7 +104,7 @@ class AdminTest extends TestCase { 'updateAvailable' => true, 'updateVersion' => '8.1.2', 'downloadLink' => 'https://downloads.nextcloud.org/server', - 'changes' => 'https://updates.nextcloud.com/changelog_server/?version=8.1.2', + 'changes' => [], 'updaterEnabled' => true, 'versionIsEol' => false, ]); @@ -125,7 +130,7 @@ class AdminTest extends TestCase { 'channels' => $channels, 'newVersionString' => '8.1.2', 'downloadLink' => 'https://downloads.nextcloud.org/server', - 'changesURL' => 'https://updates.nextcloud.com/changelog_server/?version=8.1.2', + 'changes' => [], 'updaterEnabled' => true, 'versionIsEol' => false, 'isDefaultUpdateServerURL' => true, |