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

Asserts module greater/less than documentation is opposite of functionality #1721

Closed
apkostka opened this issue Feb 17, 2015 · 1 comment
Closed
Labels

Comments

@apkostka
Copy link

In the Asserts Module documentation, it is claimed that when using assertGreaterThan($expected, $actual), the expression $expected > $actual should evaluate to true. The order of parameters is the same for assertGreaterThanOrEqual, assertLessThan, and assertLessThanOrEqual.

However, this is the opposite of actual functionality, as documented in PHPUnit. This can be tested with the following Cest code:

public function test_asserts(ApiTester $I)
{   
    $I->assertLessThan(2,1);
    $I->assertLessThanOrEqual(2,1);

    $I->assertGreaterThan(1,2);
    $I->assertGreaterThanOrEqual(1,2);
}

Each of these pass, although they contradict the documentation.

@vntw
Copy link
Contributor

vntw commented Oct 3, 2015

@DavertMik IMO this can be closed as it was fixed in 379a3f1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants