summaryrefslogtreecommitdiffstats
path: root/apps/files/tests/ActivityTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/tests/ActivityTest.php')
-rw-r--r--apps/files/tests/ActivityTest.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/files/tests/ActivityTest.php b/apps/files/tests/ActivityTest.php
index e6199013e81..65e914c1a54 100644
--- a/apps/files/tests/ActivityTest.php
+++ b/apps/files/tests/ActivityTest.php
@@ -24,6 +24,8 @@
namespace OCA\Files\Tests;
use OCA\Files\Activity;
+use OCP\IL10N;
+use OCP\L10N\IFactory;
use Test\TestCase;
/**
@@ -77,12 +79,8 @@ class ActivityTest extends TestCase {
$this->config
);
- $this->l10nFactory = $this->getMockBuilder('OCP\L10N\IFactory')
- ->disableOriginalConstructor()
- ->getMock();
- $deL10n = $this->getMockBuilder('OC_L10N')
- ->disableOriginalConstructor()
- ->getMock();
+ $this->l10nFactory = $this->createMock(IFactory::class);
+ $deL10n = $this->createMock(IL10N::class);
$deL10n->expects($this->any())
->method('t')
->willReturnCallback(function ($argument) {
@@ -92,8 +90,8 @@ class ActivityTest extends TestCase {
$this->l10nFactory->expects($this->any())
->method('get')
->willReturnMap([
- ['files', null, new \OC_L10N('files', 'en')],
- ['files', 'en', new \OC_L10N('files', 'en')],
+ ['files', null, \OC::$server->getL10N('files', 'en')],
+ ['files', 'en', \OC::$server->getL10N('files', 'en')],
['files', 'de', $deL10n],
]);