diff options
Diffstat (limited to 'tests/lib/L10N')
-rw-r--r-- | tests/lib/L10N/FactoryTest.php | 8 | ||||
-rw-r--r-- | tests/lib/L10N/L10nTest.php | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/lib/L10N/FactoryTest.php b/tests/lib/L10N/FactoryTest.php index 4e01602a4f7..7af069cbff3 100644 --- a/tests/lib/L10N/FactoryTest.php +++ b/tests/lib/L10N/FactoryTest.php @@ -13,6 +13,7 @@ namespace Test\L10N; use OC\L10N\Factory; use OC\L10N\LanguageNotFoundException; +use OCP\ICacheFactory; use OCP\IConfig; use OCP\IRequest; use OCP\IUser; @@ -32,6 +33,9 @@ class FactoryTest extends TestCase { /** @var IUserSession|MockObject */ protected $userSession; + /** @var ICacheFactory|MockObject */ + protected $cacheFactory; + /** @var string */ protected $serverRoot; @@ -41,6 +45,7 @@ class FactoryTest extends TestCase { $this->config = $this->createMock(IConfig::class); $this->request = $this->createMock(IRequest::class); $this->userSession = $this->createMock(IUserSession::class); + $this->cacheFactory = $this->createMock(ICacheFactory::class); $this->serverRoot = \OC::$SERVERROOT; } @@ -64,13 +69,14 @@ class FactoryTest extends TestCase { $this->config, $this->request, $this->userSession, + $this->cacheFactory, $this->serverRoot, ]) ->setMethods($methods) ->getMock(); } - return new Factory($this->config, $this->request, $this->userSession, $this->serverRoot); + return new Factory($this->config, $this->request, $this->userSession, $this->cacheFactory, $this->serverRoot); } public function dataFindAvailableLanguages(): array { diff --git a/tests/lib/L10N/L10nTest.php b/tests/lib/L10N/L10nTest.php index f410c523c05..f224592432c 100644 --- a/tests/lib/L10N/L10nTest.php +++ b/tests/lib/L10N/L10nTest.php @@ -11,6 +11,7 @@ namespace Test\L10N; use DateTime; use OC\L10N\Factory; use OC\L10N\L10N; +use OCP\ICacheFactory; use OCP\IConfig; use OCP\IRequest; use OCP\IUserSession; @@ -32,7 +33,8 @@ class L10nTest extends TestCase { $request = $this->createMock(IRequest::class); /** @var IUserSession $userSession */ $userSession = $this->createMock(IUserSession::class); - return new Factory($config, $request, $userSession, \OC::$SERVERROOT); + $cacheFactory = $this->createMock(ICacheFactory::class); + return new Factory($config, $request, $userSession, $cacheFactory, \OC::$SERVERROOT); } public function testSimpleTranslationWithTrailingColon(): void { |