From 3c48eadb7f6a614c58fe5745b8ddb8add9c3548b Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Wed, 15 Jun 2022 10:41:43 -0400 Subject: [PATCH] add unit test to make sure overriden to method keeps bc with laravel --- tests/Router/UrlGeneratorTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Router/UrlGeneratorTest.php b/tests/Router/UrlGeneratorTest.php index 0947d2434..58c8542ca 100644 --- a/tests/Router/UrlGeneratorTest.php +++ b/tests/Router/UrlGeneratorTest.php @@ -510,4 +510,13 @@ public function testStripSegments() http_build_url($segments, [], HTTP_URL_STRIP_PORT | HTTP_URL_STRIP_QUERY | HTTP_URL_STRIP_FRAGMENT) ); } + + public function testQueryArgsArray() + { + $url = 'https://www.example.com/path?array[]=v1&array[]=v2'; + $generator = new \Winter\Storm\Router\UrlGenerator(new RouteCollection, Request::create($url)); + $baseGenerator = new \Illuminate\Routing\UrlGenerator(new RouteCollection, Request::create($url)); + + $this->assertEquals($generator->to($url), $baseGenerator->to($url)); + } }