diff options
author | Iltar van der Berg <ivanderberg@hostnet.nl> | 2015-01-15 10:04:56 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-01-16 16:11:12 +0100 |
commit | e26eec7c5599a8ab6fd2b5c448e97970f2db3cf9 (patch) | |
tree | e10eb6b1d244406d98830beef59756c65088b154 /Http/Tests/Authentication | |
parent | 000c29c2deaea9e4ea3e30ee7ac5409a7090b2da (diff) | |
download | symfony-security-e26eec7c5599a8ab6fd2b5c448e97970f2db3cf9.zip symfony-security-e26eec7c5599a8ab6fd2b5c448e97970f2db3cf9.tar.gz symfony-security-e26eec7c5599a8ab6fd2b5c448e97970f2db3cf9.tar.bz2 |
[DX] Attempt to improve logging messages with parameters
Diffstat (limited to 'Http/Tests/Authentication')
-rw-r--r-- | Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php b/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php index e065660..fd06e23 100644 --- a/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php +++ b/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php @@ -105,7 +105,10 @@ class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCas public function testRedirectIsLogged() { - $this->logger->expects($this->once())->method('debug')->with('Redirecting to /login'); + $this->logger + ->expects($this->once()) + ->method('debug') + ->with('Authentication failure, redirect triggered.', array('failure_path' => '/login')); $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, array(), $this->logger); $handler->onAuthenticationFailure($this->request, $this->exception); @@ -119,7 +122,10 @@ class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCas ->method('createRequest')->with($this->request, '/login') ->will($this->returnValue($this->getRequest())); - $this->logger->expects($this->once())->method('debug')->with('Forwarding to /login'); + $this->logger + ->expects($this->once()) + ->method('debug') + ->with('Authentication failure, forward triggered.', array('failure_path' => '/login')); $handler = new DefaultAuthenticationFailureHandler($this->httpKernel, $this->httpUtils, $options, $this->logger); $handler->onAuthenticationFailure($this->request, $this->exception); |