public function testOnSiteAccessMatchNoConfiguredSessionName()
{
$configuredSessionStorageOptions = array('cookie_path' => '/bar');
$sessionName = 'some_default_name';
$sessionOptions = $configuredSessionStorageOptions + array('name' => "eZSESSID_{$sessionName}");
$this->session->expects($this->once())->method('isStarted')->will($this->returnValue(false));
$this->session->expects($this->once())->method('getName')->will($this->returnValue('some_default_name'));
$this->sessionStorage->expects($this->once())->method('setOptions')->with($sessionOptions);
$this->configResolver->expects($this->once())->method('getParameter')->with('session')->will($this->returnValue($configuredSessionStorageOptions));
$listener = new SessionSetDynamicNameListener($this->configResolver, $this->session, $this->sessionStorage);
$listener->onSiteAccessMatch(new PostSiteAccessMatchEvent(new SiteAccess(), new Request(), HttpKernelInterface::MASTER_REQUEST));
}