public function testOnSiteAccessMatch() { $rootLocationId = 123; $excludedUriPrefixes = array('/foo/bar', '/baz'); $this->configResolver->expects($this->any())->method('getParameter')->will($this->returnValueMap(array(array('content.tree_root.location_id', null, null, $rootLocationId), array('content.tree_root.excluded_uri_prefixes', null, null, $excludedUriPrefixes)))); $this->urlAliasRouter->expects($this->once())->method('setRootLocationId')->with($rootLocationId); $this->urlAliasGenerator->expects($this->once())->method('setRootLocationId')->with($rootLocationId); $this->urlAliasGenerator->expects($this->once())->method('setExcludedUriPrefixes')->with($excludedUriPrefixes); $event = new PostSiteAccessMatchEvent(new SiteAccess(), new Request(), HttpKernelInterface::MASTER_REQUEST); $listener = new RoutingListener($this->configResolver, $this->urlAliasRouter, $this->urlAliasGenerator); $listener->onSiteAccessMatch($event); }