From 808a3b219e8a1c95017886ffd782bb06fb61220d Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Mon, 7 Mar 2022 00:49:04 +0000 Subject: [PATCH] [TESTS] Specify non-null fields for use of creating actors in tests --- tests/Core/DB/DBTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Core/DB/DBTest.php b/tests/Core/DB/DBTest.php index f40d575efd..9191b70864 100644 --- a/tests/Core/DB/DBTest.php +++ b/tests/Core/DB/DBTest.php @@ -21,6 +21,7 @@ declare(strict_types = 1); namespace App\Tests\Core\DB; +use App\Core\ActorLocalRoles; use App\Core\DB\DB; use App\Entity\Actor; use App\Entity\LocalUser; @@ -80,7 +81,7 @@ class DBTest extends GNUsocialTestCase public function testPersistWithSameId() { - $actor = Actor::create(['nickname' => 'test', 'bio' => 'some very interesting bio', 'is_local' => false]); + $actor = Actor::create(['nickname' => 'test', 'bio' => 'some very interesting bio', 'is_local' => false, 'roles' => ActorLocalRoles::NONE, 'type' => Actor::PERSON]); $user = LocalUser::create(['nickname' => 'test']); $id = DB::persistWithSameId($actor, $user, fn ($id) => $id); static::assertTrue($id != 0);