/**
  * @dataProvider validUrlProvider
  *
  * @param string $urlString
  * @param array $expectedResult
  */
 public function testGetPort($urlString, array $expectedResult)
 {
     $url = new Url($urlString);
     $this->assertEquals(array_key_exists('port', $expectedResult) ? $expectedResult['port'] : null, $url->getPort());
 }
 /**
  * @return int|null
  */
 public function getPort()
 {
     return $this->url->getPort();
 }