Skip to content

Commit

Permalink
[Asserts] Updated examples of assertEquals and assertNotEquals
Browse files Browse the repository at this point in the history
assertEquals and assertNotEquals had the arguments mixed up in the examples. It should be $expected, $actual. It was $actual, $expected
  • Loading branch information
Hexoplon authored and Naktibalda committed Sep 4, 2018
1 parent 04982e3 commit 93e89ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Codeception/Module/Asserts.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class Asserts extends CodeceptionModule
* Regular example:
* ```php
* <?php
* $I->assertEquals($element->getChildrenCount(), 5);
* $I->assertEquals(5, $element->getChildrenCount());
* ```
*
* Floating-point example:
* ```php
* <?php
* $I->assertEquals($calculator->add(0.1, 0.2), 0.3, 'Calculator should add the two numbers correctly.', 0.01);
* $I->assertEquals(0.3, $calculator->add(0.1, 0.2), 'Calculator should add the two numbers correctly.', 0.01);
* ```
*
* @param $expected
Expand All @@ -44,13 +44,13 @@ public function assertEquals($expected, $actual, $message = '', $delta = 0.0)
* Regular example:
* ```php
* <?php
* $I->assertNotEquals($element->getChildrenCount(), 0);
* $I->assertNotEquals(0, $element->getChildrenCount());
* ```
*
* Floating-point example:
* ```php
* <?php
* $I->assertNotEquals($calculator->add(0.1, 0.2), 0.4, 'Calculator should add the two numbers correctly.', 0.01);
* $I->assertNotEquals(0.4, $calculator->add(0.1, 0.2), 'Calculator should add the two numbers correctly.', 0.01);
* ```
*
* @param $expected
Expand Down

0 comments on commit 93e89ec

Please sign in to comment.