Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 5 additions & 2 deletions shared/Commands/DemoCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author Arman Ag. <arman.ag@softberg.org>
* @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;
Expand Down Expand Up @@ -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
{
Expand Down
18 changes: 3 additions & 15 deletions tests/Feature/AppTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down