/** * @param array $config * @param string $pathinfo * @param string $expectedMapKey * * @dataProvider setRequestProvider */ public function testSetGetRequest($config, $pathinfo, $expectedMapKey) { $request = new SimplifiedRequest(array('pathinfo' => $pathinfo)); $matcher = new URIMapMatcher($config); $matcher->setRequest($request); $this->assertSame($request, $matcher->getRequest()); $this->assertSame($expectedMapKey, $matcher->getMapKey()); }
public function testSetGetRequest() { $request = new SimplifiedRequest(array('pathinfo' => '/bar/baz')); $mapKey = 'bar'; $matcher = new URIMapMatcher(array('foo' => $mapKey)); $matcher->setRequest($request); $this->assertSame($request, $matcher->getRequest()); $this->assertSame($mapKey, $matcher->getMapKey()); }