Get rid of magic method in getParentEntity to make it mockable for UnitTest

Created on 21 August 2024, 4 months ago
Updated 22 August 2024, 4 months ago

Problem/Motivation

For a project we had to mock getParentEntity for a UnitTest and the use of magic method made it complex.

Steps to reproduce

Trying to mock getParentEntity() in a unit test.

Proposed resolution

In order to avoid complexe mocking a magic method we changed the ->value to ->getString() in the getParentEntity() method which I think it's better code in the end.

Remaining tasks

Review MR.

📌 Task
Status

Needs review

Version

1.18

Component

Code

Created by

🇫🇷France pbonnefoi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024