[Pkg-owncloud-commits] [owncloud] 32/457: add l10n to constructor

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:05:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 76761662547f5ac945f9103e290ad0b19e3d9d10
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Mon May 18 13:09:36 2015 +0200

    add l10n to constructor
---
 apps/encryption/appinfo/application.php             |  3 ++-
 apps/encryption/lib/crypto/encryption.php           | 10 ++++++++--
 apps/encryption/tests/lib/crypto/encryptionTest.php |  9 ++++++++-
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/apps/encryption/appinfo/application.php b/apps/encryption/appinfo/application.php
index 79b2ad3..10ad610 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 c060bb0..83ed1b5 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 960ed11..419aed7 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
 		);
 
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list