Update test to pass l10n instead of factory
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
af8ad96285
commit
29fede5fe5
|
@ -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 {
|
||||||
$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
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue