Code Inspection: Deprecated 'assertEquals/assertNotEquals' usage
Reports deprecated usages of the assertEquals
and assertNotEquals
functions with $delta
, $maxDepth
, $canonicalize
, and $ignoreCase
parameters.
The optional $delta
, $maxDepth
, $canonicalize
, and $ignoreCase
parameters of the assertEquals
and assertNotEquals
functions are deprecated and will be removed in PHPUnit 9.
See Usage of the assertEquals function (phpunit.readthedocs.io) for details.
In the following example, the assertEquals()
calls are used for asserting several different conditions: whether the string
and value
values are canonically equal, whether the difference between them is greater than a delta value, and whether they are equal regardless their case. After the quick-fix is applied, the more specific assertEqualsCanonicalizing()
, assertEqualsWithDelta()
, and assertEqualsIgnoringCase()
are used instead.
Suppress an inspection in the editor
Place the caret at the highlighted line and press Alt+Enter or click .
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.