This repository was archived by the owner on Jun 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -1084,15 +1084,31 @@ public function testSetCookiesShouldRemoveCookieHeader()
10841084 $ this ->assertSame ('' , $ result ->getHeader ('Cookie ' ));
10851085 }
10861086
1087- public function testSetRequestUriWithNoQueryString ()
1087+ /**
1088+ * @dataProvider providerSetRequestUriWithNoQueryString
1089+ *
1090+ * @param string $requestUri
1091+ */
1092+ public function testSetRequestUriWithNoQueryString (string $ requestUri )
10881093 {
10891094 $ request = new Request ();
1090- $ result = $ request ->setRequestUri (' http://localhost/ ' );
1095+ $ result = $ request ->setRequestUri ($ requestUri );
10911096 $ this ->assertInstanceOf (Request::class, $ result );
1092- $ this ->assertContains ( ' http://localhost/ ' , $ result ->getRequestUri ());
1097+ $ this ->assertSame ( $ requestUri , $ result ->getRequestUri ());
10931098 $ this ->assertSame ([], $ result ->getQuery ());
10941099 $ this ->assertSame ('' , $ result ->getQueryString ());
1095- $ this ->assertSame ('http://localhost/ ' , $ result ->getPath ());
1100+ $ this ->assertSame (rtrim ($ requestUri , '? ' ), $ result ->getPath ());
1101+ }
1102+
1103+ /**
1104+ * @return array
1105+ */
1106+ public function providerSetRequestUriWithNoQueryString ()
1107+ {
1108+ return [
1109+ ['/foo ' ],
1110+ ['/foo/bar? ' ]
1111+ ];
10961112 }
10971113
10981114 /**
You can’t perform that action at this time.
0 commit comments