diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-02-26 17:50:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-26 17:50:21 +0100 |
commit | a60d7a8563f6f9e8047ac187e8f96f09f6dfa844 (patch) | |
tree | ed188b5a10bd2006b3ca97bea0e6e5502eb49192 /tests/lib/AppFramework | |
parent | 67a76b00e8e05dbed5acaa8f9dc6a7d28065e6aa (diff) | |
parent | cf35c4b03ab7bd73cc5e9a26d88a0c61731d4b6e (diff) | |
download | nextcloud-server-a60d7a8563f6f9e8047ac187e8f96f09f6dfa844.tar.gz nextcloud-server-a60d7a8563f6f9e8047ac187e8f96f09f6dfa844.zip |
Merge pull request #8541 from nextcloud/translate-permission-error-page
Provide translated error message for permission error
Diffstat (limited to 'tests/lib/AppFramework')
-rw-r--r-- | tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index e36bd727bea..a631fe59a60 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -45,13 +45,11 @@ use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; +use OCP\IL10N; use OCP\ILogger; use OCP\INavigationManager; use OCP\IRequest; -use OCP\ISession; use OCP\IURLGenerator; -use OCP\IUser; -use OCP\IUserSession; use OCP\Security\ISecureRandom; class SecurityMiddlewareTest extends \Test\TestCase { @@ -82,8 +80,8 @@ class SecurityMiddlewareTest extends \Test\TestCase { private $cspNonceManager; /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */ private $appManager; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ - private $userSession; + /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + private $l10n; protected function setUp() { parent::setUp(); @@ -98,6 +96,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->csrfTokenManager = $this->createMock(CsrfTokenManager::class); $this->cspNonceManager = $this->createMock(ContentSecurityPolicyNonceManager::class); $this->appManager = $this->createMock(IAppManager::class); + $this->l10n = $this->createMock(IL10N::class); $this->appManager->expects($this->any()) ->method('isEnabledForUser') ->willReturn(true); @@ -124,7 +123,8 @@ class SecurityMiddlewareTest extends \Test\TestCase { $this->contentSecurityPolicyManager, $this->csrfTokenManager, $this->cspNonceManager, - $this->appManager + $this->appManager, + $this->l10n ); } @@ -541,7 +541,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { new CrossSiteRequestForgeryException(), ], [ - new NotAdminException(), + new NotAdminException(''), ], ]; } |