PHPUnit assertNotEqualsIgnoringCase() Function Last Updated : 17 Aug, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report The assertNotEqualsIgnoringCase() function is a builtin function in PHPUnit and is used to assert whether the expected string is not equal to actual string but ignoring the case. This assertion will return true in the case if the actual string is not equal to expected string ignoring case-sensitivity, else return false. In case of true the asserted test case got passed else test case got failed. syntax: assertnotEqualsIgnoringCase(mixed $expected, mixed $actual[, string $message = ''] Parameters: This function accepts three parameters as mentioned above and described below: $expected: This parameter is a string that represents the expected data.$actual: This parameter is a string that represents the actual data.$message: This parameter takes a string value. When the test case got failed this string message got displayed as an error message. Below programs illustrate the assertnotEqualsIgnoringCase() function: Example 1: PHP <?php use PHPUnit\Framework\TestCase; class GeeksPhpunitTestCase extends TestCase { public function testNegativTestcaseForAssertNotequalIgnoringCase() { $expected = "Geeks"; $actual= "geEks"; // assert function to test whether expected // is not equals to actual ignoring case $this->assertNotEqualsIgnoringCase( $actual, $expected, "expected string is equal to actual ignoring case" ) ; } } ?> Output: PHPUnit 8.5.8 by Sebastian Bergmann and contributors. F 1 / 1 (100%) Time: 91 ms, Memory: 10.00 MB There was 1 failure: 1) GeeksPhpunitTestCase::testpositivTestcaseForAssertNotequalIgnoringCase expected string is equal to actual ignoring case Failed asserting that 'Geeks' is not equal to 'geEks'. /home/lovely/Documents/php/test.php:17 FAILURES! Tests: 1, Assertions: 1, Failures: 1. Example 2: PHP <?php use PHPUnit\Framework\TestCase; class GeeksPhpunitTestCase extends TestCase { public function testPositivTestcaseForAssertNotequalIgnoringCase() { $expected = "Geekss"; $actual= "geEks"; // assert function to test whether expected // is not equals to actual string ignoring case $this->assertNotEqualsIgnoringCase( $actual, $expected, "expected string is equal to actual ignoring case" ) ; } } ?> Output: PHPUnit 8.5.8 by Sebastian Bergmann and contributors. . 1 / 1 (100%) Time: 91 ms, Memory: 10.00 MB OK (1 test, 1 assertion) Comment More infoAdvertise with us Next Article PHPUnit assertNotEqualsIgnoringCase() Function S shubham_singh Follow Improve Article Tags : Web Technologies PHP PHP-PHPUnit Similar Reads PHPUnit assertEqualsIgnoringCase() Function The assertEqualsIgnoringCase() function is a builtin function in PHPUnit and is used to check whether the expected string is equal to actual string ignoring the string-case of expected string. This assertion will return true in the case if the actual string is equal to expected string  ignoring case 2 min read PHPunit | assertNotEquals() Function The assertNotEquals() function is a builtin function in PHPUnit and is used to assert the actual obtained value to be not-equals to expected value. This assertion will return true in the case if the expected value is not-equals to actual value else returns false. In case of true the asserted test ca 2 min read PHPUnit | assertStringContainsStringIgnoringCase() function The assertStringContainsStringIgnoringCase() function is a builtin function in PHPUnit and is used to assert a string containing a substring but ignoring the case of substring. This assertion will return true in the case if the string contains the substring as a substring ignoring case-sensitivity, 2 min read PHPUnit assertNotFalse() Function The assertNotFalse() function is a builtin function in PHPUnit and is used to assert the conditional value is true. This assertion will return true in the case if the conditional value is true else return false. In case of true, the asserted test case got passed else test case got failed. Syntax : a 2 min read PHPUnit assertFileNotEquals() Function The assertFileNotEquals() function is a builtin function in PHPUnit and is used to assert whether the actual file content is different from expected file content or not. This assertion will return true in the case if the expected file content is not-equals to actual file content else returns false. 2 min read Like