summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-01-23 11:56:02 +0100
committerGitHub <noreply@github.com>2018-01-23 11:56:02 +0100
commit4537faa5dabdcb2f0b888baa5031e59099e52d6a (patch)
tree0295177ddd5f6736739c503131eb75323561b220 /tests
parent9cb3a79b18bb74e3f79d53aa400d7efa5b2c2174 (diff)
parent2a38605545e26ce68a37e5ebb877fd9c9875a37d (diff)
downloadnextcloud-server-4537faa5dabdcb2f0b888baa5031e59099e52d6a.tar.gz
nextcloud-server-4537faa5dabdcb2f0b888baa5031e59099e52d6a.zip
Merge pull request #7918 from nextcloud/properly-log-exceptions
Properly log the full exception instead of only the message
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php6
-rw-r--r--tests/lib/CapabilitiesManagerTest.php2
2 files changed, 3 insertions, 5 deletions
diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
index 151d6935e7f..0d7418673dd 100644
--- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
@@ -483,8 +483,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
->will($this->returnValue('http://localhost/nextcloud/index.php/login?redirect_url=nextcloud/index.php/apps/specialapp'));
$this->logger
->expects($this->once())
- ->method('debug')
- ->with('Current user is not logged in');
+ ->method('logException');
$response = $this->middleware->afterException(
$this->controller,
'test',
@@ -554,8 +553,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
$this->middleware = $this->getMiddleware(false, false);
$this->logger
->expects($this->once())
- ->method('debug')
- ->with($exception->getMessage());
+ ->method('logException');
$response = $this->middleware->afterException(
$this->controller,
'test',
diff --git a/tests/lib/CapabilitiesManagerTest.php b/tests/lib/CapabilitiesManagerTest.php
index 8df385e6ef9..c967b77130d 100644
--- a/tests/lib/CapabilitiesManagerTest.php
+++ b/tests/lib/CapabilitiesManagerTest.php
@@ -148,7 +148,7 @@ class CapabilitiesManagerTest extends TestCase {
});
$this->logger->expects($this->once())
- ->method('error');
+ ->method('logException');
$res = $this->manager->getCapabilities();