At or about line 814 of PHPUnitLogger.php there is an attempt to get the difference on a comparison failure. If the getComparisonFailure method exists the code immediately tries to check for the existence of the getDiff method on the result of calling the getComparisonFailure method. However, if the comparison failure is not present, getComparisonFailure will return null. This results in a call to method_exists with the first parameter as null.
This results in "_method_exists(): Argument 1 ($object_orclass) must be of type object|string, null given" error being generated and the test case existing immediately.
There should be a check for a null return from getComparisonFailure() before checking if the getDiff method exists.
Describe your system
OS: Windows 10
Eclipse 2023-09
Eclipse PDT 8.1.0.202307170929
PHP Version 8.2
To Reproduce
Steps to reproduce the behavior:
Create a unit test (PHPUnit) with a test that will fail
Run the test
See the error in the console
Expected behavior
Test indicates what failed.
Test Case does not "unexpectedly terminate"
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
At or about line 814 of PHPUnitLogger.php there is an attempt to get the difference on a comparison failure. If the getComparisonFailure method exists the code immediately tries to check for the existence of the getDiff method on the result of calling the getComparisonFailure method. However, if the comparison failure is not present, getComparisonFailure will return null. This results in a call to method_exists with the first parameter as null.
This results in "_method_exists(): Argument 1 ($object_orclass) must be of type object|string, null given" error being generated and the test case existing immediately.
There should be a check for a null return from getComparisonFailure() before checking if the getDiff method exists.
Describe your system
To Reproduce Steps to reproduce the behavior:
Expected behavior Test indicates what failed. Test Case does not "unexpectedly terminate"
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.