Inheritance: extends eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map
 public function testGetName()
 {
     $matcher = new PortMatcher(array('port' => '8080', 'scheme' => 'http'), array());
     $this->assertSame('port', $matcher->getName());
 }
 public function testReverseMatchPort()
 {
     $config = array('80' => 'some_siteaccess', '443' => 'another_siteaccess', 8000 => 'ezdemo_site');
     $request = new SimplifiedRequest(array('scheme' => 'http', 'host' => 'ez.no'));
     $matcher = new Port($config);
     $matcher->setRequest($request);
     $this->assertSame(80, $matcher->getMapKey());
     $result = $matcher->reverseMatch('ezdemo_site');
     $this->assertInstanceOf('eZ\\Publish\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\\Port', $result);
     $this->assertSame($request, $matcher->getRequest());
     $this->assertSame(8000, $result->getMapKey());
     $this->assertSame(8000, $result->getRequest()->port);
     $this->assertSame('http', $result->getRequest()->scheme);
 }