runConfigurationAssertions( new Group, ['name'], ['created_at', 'updated_at'], ['*'], [], [ 'id' => 'int', 'twofaccounts_count' => 'integer', 'user_id' => 'integer', ], [ 'deleting' => GroupDeleting::class, 'deleted' => GroupDeleted::class, ] ); } #[Test] public function test_twofaccounts_relation() { $group = new Group; $accounts = $group->twofaccounts(); $this->assertHasManyRelation($accounts, $group, new TwoFAccount); } #[Test] public function test_user_relation() { $model = new Group; $relation = $model->user(); $this->assertInstanceOf(BelongsTo::class, $relation); $this->assertEquals('user_id', $relation->getForeignKeyName()); } }