Skip to content
Snippets Groups Projects
Unverified Commit b52491c3 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #19268 from nextcloud/fix/19261/use_settings_l10n

Use the l10n from settings
parents 411058e4 29fede5f
No related branches found
No related tags found
No related merge requests found
...@@ -52,9 +52,9 @@ class Sharing implements ISettings { ...@@ -52,9 +52,9 @@ class Sharing implements ISettings {
/** /**
* @param IConfig $config * @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->config = $config;
$this->l = $l->get('lib'); $this->l = $l;
$this->shareManager = $shareManager; $this->shareManager = $shareManager;
} }
......
...@@ -33,7 +33,6 @@ use OCP\AppFramework\Http\TemplateResponse; ...@@ -33,7 +33,6 @@ use OCP\AppFramework\Http\TemplateResponse;
use OCP\Constants; use OCP\Constants;
use OCP\IConfig; use OCP\IConfig;
use OCP\IL10N; use OCP\IL10N;
use OCP\L10N\IFactory;
use OCP\Share\IManager; use OCP\Share\IManager;
use Test\TestCase; use Test\TestCase;
...@@ -52,15 +51,11 @@ class SharingTest extends TestCase { ...@@ -52,15 +51,11 @@ class SharingTest extends TestCase {
$this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->config = $this->getMockBuilder(IConfig::class)->getMock();
$this->l10n = $this->getMockBuilder(IL10N::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->shareManager = $this->getMockBuilder(IManager::class)->getMock();
$this->admin = new Sharing( $this->admin = new Sharing(
$this->config, $this->config,
$l10Factory, $this->l10n,
$this->shareManager $this->shareManager
); );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment