mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 23:53:50 +00:00
Fix test on CalendarType: use the real IdToEntityDataTransformer, mocking the repository
This commit is contained in:
@@ -34,8 +34,11 @@ class IdToEntityDataTransformer implements DataTransformerInterface
|
||||
/**
|
||||
* @param Closure $getId
|
||||
*/
|
||||
public function __construct(private readonly ObjectRepository $repository, private readonly bool $multiple = false, ?callable $getId = null)
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ObjectRepository $repository,
|
||||
private readonly bool $multiple = false,
|
||||
?callable $getId = null
|
||||
) {
|
||||
$this->getId = $getId ?? static fn (object $o) => $o->getId();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user