use Symfony\Bundle\SecurityBundle\Security\FirewallConfig;
use Symfony\Bundle\SecurityBundle\Security\FirewallContext;
use Symfony\Component\Security\Http\Firewall\ExceptionListener;
use Symfony\Component\Security\Http\Firewall\LogoutListener;
class FirewallContextTest extends TestCase
{ public function testGetters() { $config =
new FirewallConfig('main', 'user_checker', 'request_matcher'
);
$exceptionListener =
$this->
getExceptionListenerMock();
$logoutListener =
$this->
getLogoutListenerMock();
$listeners =
[function D
) {}];
$context =
new FirewallContext($listeners,
$exceptionListener,
$logoutListener,
$config);
$this->
assertEquals($listeners,
$context->
getListeners());
$this->
assertEquals($exceptionListener,
$context->
getExceptionListener());
$this->
assertEquals($logoutListener,
$context->
getLogoutListener());
$this->
assertEquals($config,
$context->
getConfig());
} private function getExceptionListenerMock() {