diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-02-03 12:56:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-03 12:56:01 +0100 |
commit | b52491c381fe3867ee2f01b4ebd3b9f54e7dbcc3 (patch) | |
tree | d683e050f6500f91494c4c68d56dd8266df96703 /apps | |
parent | 411058e47cd42871b2099190ac67f47b9bd17e30 (diff) | |
parent | 29fede5fe56c93fee4cffe5569d3c070e2423349 (diff) | |
download | nextcloud-server-b52491c381fe3867ee2f01b4ebd3b9f54e7dbcc3.tar.gz nextcloud-server-b52491c381fe3867ee2f01b4ebd3b9f54e7dbcc3.zip |
Merge pull request #19268 from nextcloud/fix/19261/use_settings_l10n
Use the l10n from settings
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/lib/Settings/Admin/Sharing.php | 4 | ||||
-rw-r--r-- | apps/settings/tests/Settings/Admin/SharingTest.php | 7 |
2 files changed, 3 insertions, 8 deletions
diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php index c151e7be4e1..495af9d5375 100644 --- a/apps/settings/lib/Settings/Admin/Sharing.php +++ b/apps/settings/lib/Settings/Admin/Sharing.php @@ -52,9 +52,9 @@ class Sharing implements ISettings { /** * @param IConfig $config */ - public function __construct(IConfig $config, IFactory $l, IManager $shareManager) { + public function __construct(IConfig $config, IL10N $l, IManager $shareManager) { $this->config = $config; - $this->l = $l->get('lib'); + $this->l = $l; $this->shareManager = $shareManager; } diff --git a/apps/settings/tests/Settings/Admin/SharingTest.php b/apps/settings/tests/Settings/Admin/SharingTest.php index d662c1864db..5006f90cbd1 100644 --- a/apps/settings/tests/Settings/Admin/SharingTest.php +++ b/apps/settings/tests/Settings/Admin/SharingTest.php @@ -33,7 +33,6 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\Constants; use OCP\IConfig; use OCP\IL10N; -use OCP\L10N\IFactory; use OCP\Share\IManager; use Test\TestCase; @@ -52,15 +51,11 @@ class SharingTest extends TestCase { $this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->l10n = $this->getMockBuilder(IL10N::class)->getMock(); - $l10Factory = $this->createMock(IFactory::class); - $l10Factory->method('get') - ->willReturn($this->l10n); - $this->shareManager = $this->getMockBuilder(IManager::class)->getMock(); $this->admin = new Sharing( $this->config, - $l10Factory, + $this->l10n, $this->shareManager ); } |