diff --git a/composer.json b/composer.json index a5c7d7d..2e9dad3 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "MIT", "type": "project", "require": { - "quantum/framework": "^2.9.7", + "quantum/framework": "dev-master", "fakerphp/faker": "^1.15", "bluemmb/faker-picsum-photos-provider": "^2.0", "doctrine/annotations": "^2.0", diff --git a/shared/Commands/DemoCommand.php b/shared/Commands/DemoCommand.php index 17dc14f..e2a3c28 100644 --- a/shared/Commands/DemoCommand.php +++ b/shared/Commands/DemoCommand.php @@ -9,7 +9,7 @@ * @author Arman Ag. * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) * @link http://quantum.softberg.org/ - * @since 2.9.7 + * @since 2.9.8 */ namespace Shared\Commands; @@ -268,9 +268,12 @@ private function newUserData(string $role = ''): array * Post data * @param $user * @return array - * @throws ErrorException * @throws BaseException + * @throws ConfigException + * @throws DiException + * @throws ErrorException * @throws HttpClientException + * @throws ReflectionException */ private function newPostData($user): array { diff --git a/tests/Feature/AppTestCase.php b/tests/Feature/AppTestCase.php index 22a0e02..3da7320 100644 --- a/tests/Feature/AppTestCase.php +++ b/tests/Feature/AppTestCase.php @@ -73,25 +73,13 @@ public function tearDown(): void public function request( string $method, string $url, - array $options = [], + array $params = [], array $headers = [], - string $contentType = 'application/x-www-form-urlencoded' + array $files = [] ): Response { - $_SERVER['REQUEST_METHOD'] = strtoupper($method); - $_SERVER['CONTENT_TYPE'] = $contentType; - $_SERVER['REQUEST_URI'] = $url; - - if (!empty($headers)) { - foreach ($headers as $name => $value) { - $_SERVER['HTTP_' . strtoupper($name)] = $value; - } - } - - Request::create(strtoupper($method), $url, $options); - + Request::create($method, $url, $params, $headers, $files); self::$app->start(); - return new Response(); }