"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

LogoutListenerTest.php  (phplist-3.4.5.tgz):LogoutListenerTest.php  (phplist-3.4.6.tgz)
skipping to change at line 126 skipping to change at line 126
$event->expects($this->once()) $event->expects($this->once())
->method('setResponse') ->method('setResponse')
->with($response); ->with($response);
$listener->addHandler($handler); $listener->addHandler($handler);
$listener->handle($event); $listener->handle($event);
} }
/** /**
* @expectedException \RuntimeException * @group legacy
*/ */
public function testSuccessHandlerReturnsNonResponse() public function testSuccessHandlerReturnsNonResponse()
{ {
$this->expectException('RuntimeException');
$successHandler = $this->getSuccessHandler(); $successHandler = $this->getSuccessHandler();
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListene r($successHandler); list($listener, $tokenStorage, $httpUtils, $options) = $this->getListene r($successHandler);
list($event, $request) = $this->getGetResponseEvent(); list($event, $request) = $this->getGetResponseEvent();
$httpUtils->expects($this->once()) $httpUtils->expects($this->once())
->method('checkRequestPath') ->method('checkRequestPath')
->with($request, $options['logout_path']) ->with($request, $options['logout_path'])
->willReturn(true); ->willReturn(true);
$successHandler->expects($this->once()) $successHandler->expects($this->once())
->method('onLogoutSuccess') ->method('onLogoutSuccess')
->with($request) ->with($request)
->willReturn(null); ->willReturn(null);
$listener->handle($event); $listener->handle($event);
} }
/**
* @expectedException \Symfony\Component\Security\Core\Exception\LogoutExcep
tion
*/
public function testCsrfValidationFails() public function testCsrfValidationFails()
{ {
$this->expectException('Symfony\Component\Security\Core\Exception\Logout Exception');
$tokenManager = $this->getTokenManager(); $tokenManager = $this->getTokenManager();
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListene r(null, $tokenManager); list($listener, $tokenStorage, $httpUtils, $options) = $this->getListene r(null, $tokenManager);
list($event, $request) = $this->getGetResponseEvent(); list($event, $request) = $this->getGetResponseEvent();
$request->query->set('_csrf_token', 'token'); $request->query->set('_csrf_token', 'token');
$httpUtils->expects($this->once()) $httpUtils->expects($this->once())
->method('checkRequestPath') ->method('checkRequestPath')
 End of changes. 4 change blocks. 
5 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)