1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Convert more helpers in tests

This commit is contained in:
Franz Liedke
2019-07-06 01:11:19 +02:00
parent f4c0d4ba87
commit d66d2aa26e
3 changed files with 5 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ use Flarum\Tests\integration\RetrievesAuthorizedUsers;
use Flarum\Tests\integration\TestCase;
use Flarum\User\Guest;
use Flarum\User\User;
use Illuminate\Support\Str;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
@@ -47,7 +48,7 @@ class AuthenticateWithApiKeyTest extends TestCase
{
return ApiKey::unguarded(function () use ($user_id) {
return ApiKey::query()->firstOrCreate([
'key' => str_random(),
'key' => Str::random(),
'user_id' => $user_id,
'created_at' => Carbon::now()
]);