From 0994fce32593f4808a96b7b9cf456a080dcba48b Mon Sep 17 00:00:00 2001 From: Terry Lin Date: Sun, 5 Jul 2020 04:08:17 +0800 Subject: [PATCH] Update tests. --- src/Psr17/Utils/SuperGlobal.php | 2 +- tests/Psr17/Utils/SuperGlobalTest.php | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Psr17/Utils/SuperGlobal.php b/src/Psr17/Utils/SuperGlobal.php index 4023efe..39e1929 100644 --- a/src/Psr17/Utils/SuperGlobal.php +++ b/src/Psr17/Utils/SuperGlobal.php @@ -96,7 +96,7 @@ public static function mockCliEnvironment(array $server = []): void ]; if (defined('NO_MOCK_ENV')) { - $defaultServerParams = []; + $defaultServerParams = []; } $_SERVER = array_merge($defaultServerParams, $_SERVER, $server); diff --git a/tests/Psr17/Utils/SuperGlobalTest.php b/tests/Psr17/Utils/SuperGlobalTest.php index 94d071a..8ef76c5 100644 --- a/tests/Psr17/Utils/SuperGlobalTest.php +++ b/tests/Psr17/Utils/SuperGlobalTest.php @@ -10,14 +10,13 @@ namespace Shieldon\Test\Psr17\Utils; -use PHPUnit\Framework\TestCase; -use Shieldon\Psr17\Utils\SuperGlobal; - -class SuperGlobalTest extends TestCase +class SuperGlobalTest extends \PHPUnit\Framework\TestCase { public function test_Static_extract() { - $data = SuperGlobal::extract(); + $_SERVER = []; + + $data = \Shieldon\Psr17\Utils\SuperGlobal::extract(); $array = [ 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9',