From 2a38605545e26ce68a37e5ebb877fd9c9875a37d Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 17 Jan 2018 15:21:56 +0100 Subject: Properly log the full exception instead of only the message Signed-off-by: Morris Jobke --- .../lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php | 6 ++---- tests/lib/CapabilitiesManagerTest.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'tests') 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(); -- cgit v1.2.3