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