routing icon indicating copy to clipboard operation
routing copied to clipboard

withPath does not match path without ending slash

Open MartkCz opened this issue 4 years ago • 0 comments

Version: dev-master

Bug Description

Different behavior of matching path and path/

Steps To Reproduce

$list = new RouteList();
$list->withPath('admin')
	->addRoute('[<presenter>]');
$list->addRoute('[<presenter>]');

var_dump($list->match(new Request(new UrlScript('http://localhost/admin/')))); // first route match
var_dump($list->match(new Request(new UrlScript('http://localhost/admin')))); // second route match

Expected Behavior

Both cases match first route

MartkCz avatar Dec 10 '21 14:12 MartkCz