use Symfony\Component\Security\Core\Exception\LogoutException;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
use Symfony\Component\Security\Http\Event\LogoutEvent;
use Symfony\Component\Security\Http\Firewall\LogoutListener;
use Symfony\Component\Security\Http\HttpUtils;
class LogoutListenerTest extends TestCase
{ public function testHandleUnmatchedPath() { $dispatcher =
$this->
getEventDispatcher();
[$listener, ,
$httpUtils,
$options] =
$this->
getListener($dispatcher);
$logoutEventDispatched = false;
$dispatcher->
addListener(LogoutEvent::
class,
function D
) use (&
$logoutEventDispatched) { $logoutEventDispatched = true;
});
$request =
new Request();
$httpUtils->
expects($this->
once()) ->
method('checkRequestPath'
) ->
with($request,
$options['logout_path'
])