Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: port assertEquals() with delta to assertEqualsWithDelta() #5078

Merged
merged 1 commit into from
Oct 11, 2022

Commits on Oct 10, 2022

  1. tests: port assertEquals() with delta to assertEqualsWithDelta()

    assertEquals() in phpunit 9.5 no longer takes a delta parameter
    and has assertEqualsWithDelta() as a replacement. This means
    float get compared without a delta atm, and a recent phpunit
    release (9.5.25) has made float comparisons stricter resulting in
    test suite errors such as:
    
    1) SubtaskTimeTrackingModelTest::testCalculateSubtaskTime
    Total spent
    Failed asserting that 3.3000000000000003 matches expected 3.3.
    tests/units/Model/SubtaskTimeTrackingModelTest.php:186
    
    This replaces all assertEquals() calls that pass a delta value
    with assertEqualsWithDelta().
    lazka committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    74d477f View commit details
    Browse the repository at this point in the history