Files
FOSSBilling/tests/Helpers/EntityManager.php
T
Adam Daley 5ee72a234a Migrate Email, Extension and Support modules to Doctrine (#3863)
* Migrate Email, Extension, Support modules to Doctrine ORM

* Add 'initialises' to cspell.json custom words

* Add patch76 and fix extension deactivation event

* Bump database patch version to 76

* Refactor Support APIs to mapped Doctrine flows

* Handle legacy email queue and ticket filters

* Migrate Support module to Doctrine ORM

* Refactor services to use typed repositories

* Route order ticket count and ticket messages through repositories

Drops the last two thin Support\Service wrappers, calling the
SupportTicketRepository and SupportTicketMessageRepository directly
from the cross-module callers.

* Rename email queue table and add patch

* Preserve unlimited email queue processing

* Preserve unlimited email queue processing
2026-07-03 10:07:01 +03:00

26 lines
648 B
PHP

<?php
/**
* Copyright 2022-2026 FOSSBilling
* SPDX-License-Identifier: Apache-2.0.
*
* @copyright FOSSBilling (https://www.fossbilling.org)
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
*/
declare(strict_types=1);
namespace Tests\Helpers;
/**
* Force the value of an entity's `id` property via reflection.
*
* Doctrine entities have private `id` properties; tests need to set them
* directly to simulate a persisted row without going through the database.
*/
function setEntityId(object $entity, int $id): void
{
$reflection = new \ReflectionProperty($entity, 'id');
$reflection->setValue($entity, $id);
}