diff --git a/.gitignore b/.gitignore index 32c14d01b5..f30743491a 100644 --- a/.gitignore +++ b/.gitignore @@ -126,4 +126,4 @@ nb-configuration.xml .vscode/ /results/ -/phpunit.xml +/phpunit*.xml diff --git a/application/Config/App.php b/application/Config/App.php index 6a426faf4e..9dc72bf4d4 100644 --- a/application/Config/App.php +++ b/application/Config/App.php @@ -215,7 +215,7 @@ class App extends BaseConfig | Reverse Proxy IPs |-------------------------------------------------------------------------- | - | If your getServer is behind a reverse proxy, you must whitelist the proxy + | If your server is behind a reverse proxy, you must whitelist the proxy | IP addresses from which CodeIgniter should trust headers such as | HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify | the visitor's IP address. diff --git a/tests/system/HTTP/RequestTest.php b/tests/system/HTTP/RequestTest.php index 8d189dbb2a..dce721fb1b 100644 --- a/tests/system/HTTP/RequestTest.php +++ b/tests/system/HTTP/RequestTest.php @@ -1,4 +1,5 @@ -request = new Request(new App()); - $_POST = []; - $_GET = []; + $this->request = new Request(new App()); + $_POST = []; + $_GET = []; } + //-------------------------------------------------------------------- + public function testFetchGlobalsSingleValue() { - $_POST['foo'] = 'bar'; - $_GET['bar'] = 'baz'; + $_POST['foo'] = 'bar'; + $_GET['bar'] = 'baz'; $this->assertEquals('bar', $this->request->fetchGlobal('post', 'foo')); $this->assertEquals('baz', $this->request->fetchGlobal('get', 'bar')); @@ -38,8 +42,8 @@ class RequestTest extends \CIUnitTestCase public function testFetchGlobalsFiltersValues() { $this->request->setGlobal('post', [ - 'foo' => 'bar