[TESTS] Specify non-null fields for use of creating actors in tests
This commit is contained in:
parent
df40dd7c66
commit
808a3b219e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user