Skip to content

Commit

Permalink
equals and not equals use WithDelta version of asserts (#42)
Browse files Browse the repository at this point in the history
This remove the following error message:

```
[PHPUnit\Framework\Warning] The optional $delta parameter of assertNotEquals() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertNotEqualsWithDelta() instead.
```
  • Loading branch information
ricpelo authored Feb 15, 2020
1 parent 532e526 commit dfe9173
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Codeception/Verify.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function setIsFileExpectation($isFileExpectation)
public function equals($expected, $delta = 0)
{
if ( ! $this->isFileExpectation ) {
a::assertEquals($expected, $this->actual, $this->description, $delta);
a::assertEqualsWithDelta($expected, $this->actual, $delta, $this->description);
} else {
a::assertFileEquals($expected, $this->actual, $this->description);
}
Expand All @@ -45,7 +45,7 @@ public function equals($expected, $delta = 0)
public function notEquals($expected, $delta = 0)
{
if ( ! $this->isFileExpectation ) {
a::assertNotEquals($expected, $this->actual, $this->description, $delta);
a::assertNotEqualsWithDelta($expected, $this->actual, $delta, $this->description);
} else {
a::assertFileNotEquals($expected, $this->actual, $this->description);
}
Expand Down

0 comments on commit dfe9173

Please sign in to comment.