Fixes up $uri to remove the siteaccess part, if needed.
public analyseURI ( string $uri ) : string | ||
$uri | string | The original URI |
Результат | string |
/** * @param string $uri * @param string $expectedFixedUpURI * * @dataProvider fixupURIProvider */ public function testAnalyseURI($uri, $expectedFixedUpURI) { $matcher = new URIMapMatcher(array()); $matcher->setRequest(new SimplifiedRequest(array('pathinfo' => $uri))); $this->assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); // Unserialized matcher should have the same behavior $unserializedMatcher = unserialize(serialize($matcher)); $this->assertSame($expectedFixedUpURI, $unserializedMatcher->analyseURI($uri)); }
/** * @param string $uri * @param string $expectedFixedUpURI * * @dataProvider fixupURIProvider */ public function testAnalyseURI($uri, $expectedFixedUpURI) { $matcher = new URIMapMatcher(array()); $matcher->setRequest(new SimplifiedRequest(array('pathinfo' => $uri))); $this->assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); }