1
0
mirror of https://github.com/flarum/core.git synced 2025-08-17 05:44:13 +02:00

added the create discussion test, also renamed some classes that seem to have been incorrectly renamed from the other testing branch

This commit is contained in:
Daniel Klabbers
2018-04-13 09:06:42 +02:00
parent 17f29f83c9
commit 264664ac79
5 changed files with 95 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ use Flarum\Foundation\Application;
use Flarum\Http\Controller\ControllerInterface;
use Flarum\User\User;
use InvalidArgumentException;
use Psr\Http\Message\ResponseInterface;
use Zend\Diactoros\ServerRequestFactory;
class Client
@@ -46,10 +47,10 @@ class Client
* @param User|null $actor
* @param array $queryParams
* @param array $body
* @return \Psr\Http\Message\ResponseInterface
* @return ResponseInterface
* @throws Exception
*/
public function send($controller, $actor, array $queryParams = [], array $body = [])
public function send($controller, User $actor = null, array $queryParams = [], array $body = []): ResponseInterface
{
$request = ServerRequestFactory::fromGlobals(null, $queryParams, $body);