You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of the code above will print empty arrays. This prevents from using PHPUnit assertions for number comparisons because PHPUnit converts objects to arrays for the detailed comparison. It is not a big issue to convert decimals to strings when we compare them directly:
Currently, while the Decimal has properties, they can not be traversed with
foreach
or any other way:All of the code above will print empty arrays. This prevents from using PHPUnit assertions for number comparisons because PHPUnit converts objects to arrays for the detailed comparison. It is not a big issue to convert decimals to strings when we compare them directly:
But it IS an issue when we compare objects or arrays containing decimals.
PHPUnit will detect empty objects and return true always, no matter wat are actual values in compared objects.
The text was updated successfully, but these errors were encountered: