1
0
mirror of https://github.com/flarum/core.git synced 2025-08-12 03:14:33 +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

@@ -15,12 +15,14 @@ use Flarum\Api\ApiServiceProvider;
use Flarum\Api\Client;
use Flarum\User\Guest;
use Flarum\User\User;
use Flarum\User\UserServiceProvider;
use Psr\Http\Message\ResponseInterface;
trait MakesApiRequests
{
public function call(string $controller, User $actor = null, array $queryParams = [], array $body = []): ResponseInterface
{
$this->app->register(UserServiceProvider::class);
$this->app->register(ApiServiceProvider::class);
$this->app->make('flarum.api.middleware');
/** @var Client $api */