Skip to content

assertLessThan has wrong number #9500

@gemal

Description

@gemal

Bug Report

using version 2.2.7

Minimal PHP Code Causing Issue

my code looks like this:
Assert::assertFalse($result > 0, $message);

and the the ran the AssertComparisonToSpecificMethodRector fixer

I got this:

-Assert::assertFalse($result > 0, $message);
+Assert::assertLessThan(0, $result, $message);

which is wrong since before 0 was accepted, with new code it's not

Expected Behaviour

-Assert::assertFalse($result > 0, $message);
+Assert::assertLessThan(1, $result, $message);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions