@@ -1096,12 +1096,13 @@ public function testBasedNoIndex()
10961096 $ config ->baseURL = 'http://example.com/ci/v4/ ' ;
10971097 $ config ->indexPage = 'index.php ' ;
10981098 $ request = Services::request ($ config );
1099- $ request ->uri = new URI ('http://example.com/somewhere ' );
1099+ $ request ->uri = new URI ('http://example.com/ci/v4/x/y ' );
11001100
11011101 Services::injectMock ('request ' , $ request );
11021102
11031103 $ this ->assertEquals ('http://example.com/ci/v4/index.php/controller/method ' , site_url ('controller/method ' , null , $ config ));
11041104 $ this ->assertEquals ('http://example.com/ci/v4/controller/method ' , base_url ('controller/method ' , null , $ config ));
1105+ $ this ->assertEquals (base_url (uri_string ()), current_url ());
11051106 }
11061107
11071108 public function testBasedWithIndex ()
@@ -1113,12 +1114,13 @@ public function testBasedWithIndex()
11131114 $ config ->baseURL = 'http://example.com/ci/v4/ ' ;
11141115 $ config ->indexPage = 'index.php ' ;
11151116 $ request = Services::request ($ config );
1116- $ request ->uri = new URI ('http://example.com/somewhere ' );
1117+ $ request ->uri = new URI ('http://example.com/ci/v4/index.php/x/y ' );
11171118
11181119 Services::injectMock ('request ' , $ request );
11191120
11201121 $ this ->assertEquals ('http://example.com/ci/v4/index.php/controller/method ' , site_url ('controller/method ' , null , $ config ));
11211122 $ this ->assertEquals ('http://example.com/ci/v4/controller/method ' , base_url ('controller/method ' , null , $ config ));
1123+ $ this ->assertEquals (base_url (uri_string ()), current_url ());
11221124 }
11231125
11241126 public function testBasedWithoutIndex ()
@@ -1130,12 +1132,13 @@ public function testBasedWithoutIndex()
11301132 $ config ->baseURL = 'http://example.com/ci/v4/ ' ;
11311133 $ config ->indexPage = '' ;
11321134 $ request = Services::request ($ config );
1133- $ request ->uri = new URI ('http://example.com/somewhere ' );
1135+ $ request ->uri = new URI ('http://example.com/ci/v4/x/y ' );
11341136
11351137 Services::injectMock ('request ' , $ request );
11361138
11371139 $ this ->assertEquals ('http://example.com/ci/v4/controller/method ' , site_url ('controller/method ' , null , $ config ));
11381140 $ this ->assertEquals ('http://example.com/ci/v4/controller/method ' , base_url ('controller/method ' , null , $ config ));
1141+ $ this ->assertEquals (base_url (uri_string ()), current_url ());
11391142 }
11401143
11411144 public function testBasedWithOtherIndex ()
@@ -1147,12 +1150,13 @@ public function testBasedWithOtherIndex()
11471150 $ config ->baseURL = 'http://example.com/ci/v4/ ' ;
11481151 $ config ->indexPage = 'fc.php ' ;
11491152 $ request = Services::request ($ config );
1150- $ request ->uri = new URI ('http://example.com/somewhere ' );
1153+ $ request ->uri = new URI ('http://example.com/ci/v4/x/y ' );
11511154
11521155 Services::injectMock ('request ' , $ request );
11531156
11541157 $ this ->assertEquals ('http://example.com/ci/v4/fc.php/controller/method ' , site_url ('controller/method ' , null , $ config ));
11551158 $ this ->assertEquals ('http://example.com/ci/v4/controller/method ' , base_url ('controller/method ' , null , $ config ));
1159+ $ this ->assertEquals (base_url (uri_string ()), current_url ());
11561160 }
11571161
11581162}
0 commit comments