summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-05-18 13:09:36 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-05-18 15:43:53 +0200
commit76761662547f5ac945f9103e290ad0b19e3d9d10 (patch)
treecb44fbd9481bd35b841f57acbcc46b43575950bf /apps
parenta1e60e78823d0f00681db0a6dc62a5a157b302f4 (diff)
downloadnextcloud-server-76761662547f5ac945f9103e290ad0b19e3d9d10.tar.gz
nextcloud-server-76761662547f5ac945f9103e290ad0b19e3d9d10.zip
add l10n to constructor
Diffstat (limited to 'apps')
-rw-r--r--apps/encryption/appinfo/application.php3
-rw-r--r--apps/encryption/lib/crypto/encryption.php10
-rw-r--r--apps/encryption/tests/lib/crypto/encryptionTest.php9
3 files changed, 18 insertions, 4 deletions
diff --git a/apps/encryption/appinfo/application.php b/apps/encryption/appinfo/application.php
index 79b2ad3abaf..10ad610cd4a 100644
--- a/apps/encryption/appinfo/application.php
+++ b/apps/encryption/appinfo/application.php
@@ -104,7 +104,8 @@ class Application extends \OCP\AppFramework\App {
$container->query('Crypt'),
$container->query('KeyManager'),
$container->query('Util'),
- $container->getServer()->getLogger()
+ $container->getServer()->getLogger(),
+ $container->getServer()->getL10N($container->getAppName())
);
});
diff --git a/apps/encryption/lib/crypto/encryption.php b/apps/encryption/lib/crypto/encryption.php
index c060bb04e53..83ed1b59c8a 100644
--- a/apps/encryption/lib/crypto/encryption.php
+++ b/apps/encryption/lib/crypto/encryption.php
@@ -29,6 +29,7 @@ use OCA\Encryption\Exceptions\PublicKeyMissingException;
use OCA\Encryption\Util;
use OCP\Encryption\IEncryptionModule;
use OCA\Encryption\KeyManager;
+use OCP\IL10N;
use OCP\ILogger;
class Encryption implements IEncryptionModule {
@@ -68,25 +69,30 @@ class Encryption implements IEncryptionModule {
/** @var Util */
private $util;
-
/** @var ILogger */
private $logger;
+ /** @var IL10N */
+ private $l;
+
/**
*
* @param Crypt $crypt
* @param KeyManager $keyManager
* @param Util $util
* @param ILogger $logger
+ * @param IL10N $il10n
*/
public function __construct(Crypt $crypt,
KeyManager $keyManager,
Util $util,
- ILogger $logger) {
+ ILogger $logger,
+ IL10N $il10n) {
$this->crypt = $crypt;
$this->keyManager = $keyManager;
$this->util = $util;
$this->logger = $logger;
+ $this->l = $il10n;
}
/**
diff --git a/apps/encryption/tests/lib/crypto/encryptionTest.php b/apps/encryption/tests/lib/crypto/encryptionTest.php
index 960ed112488..419aed72366 100644
--- a/apps/encryption/tests/lib/crypto/encryptionTest.php
+++ b/apps/encryption/tests/lib/crypto/encryptionTest.php
@@ -42,6 +42,9 @@ class EncryptionTest extends TestCase {
/** @var \PHPUnit_Framework_MockObject_MockObject */
private $loggerMock;
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $l10nMock;
+
public function setUp() {
parent::setUp();
@@ -57,12 +60,16 @@ class EncryptionTest extends TestCase {
$this->loggerMock = $this->getMockBuilder('OCP\ILogger')
->disableOriginalConstructor()
->getMock();
+ $this->l10nMock = $this->getMockBuilder('OCP\IL10N')
+ ->disableOriginalConstructor()
+ ->getMock();
$this->instance = new Encryption(
$this->cryptMock,
$this->keyManagerMock,
$this->utilMock,
- $this->loggerMock
+ $this->loggerMock,
+ $this->l10nMock
);
}