diff --git a/.travis.yml b/.travis.yml index 634dca0..da59538 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: php env: - CODECEPTION_VERSION: '2.6.x-dev' + CODECEPTION_VERSION: 'dev-feature/specialized-assert-equals' php: - 7.0 @@ -17,9 +17,11 @@ script: - php robo.phar test cli - php robo.phar test "unit -g core" - php robo.phar test "tests/unit/Codeception/Constraints/" + - php robo.phar test "tests/unit/Codeception/Module/AssertsTest.php" # run tests with 2.5 branch - CODECEPTION_VERSION=2.5.x-dev php robo.phar prepare - composer update - php robo.phar test cli - php robo.phar test "unit -g core" - php robo.phar test "tests/unit/Codeception/Constraints/" + - php robo.phar test "tests/unit/Codeception/Module/AssertsTest.php" diff --git a/src/TestCase.php b/src/TestCase.php index 293a8ca..d2f78cf 100644 --- a/src/TestCase.php +++ b/src/TestCase.php @@ -186,4 +186,34 @@ public static function assertIsNotIterable($actual, $message = '') { \Codeception\PHPUnit\TestCase::assertNotInternalType('iterable', $actual, $message); } + + public static function assertEqualsCanonicalizing($expected, $actual, $message = '') + { + \Codeception\PHPUnit\TestCase::assertEquals($expected, $actual, $message, 0.0, 10, true, false); + } + + public static function assertNotEqualsCanonicalizing($expected, $actual, $message = '') + { + \Codeception\PHPUnit\TestCase::assertNotEquals($expected, $actual, $message, 0.0, 10, true, false); + } + + public static function assertEqualsIgnoringCase($expected, $actual, $message = '') + { + \Codeception\PHPUnit\TestCase::assertEquals($expected, $actual, $message, 0.0, 10, false, true); + } + + public static function assertNotEqualsIgnoringCase($expected, $actual, $message = '') + { + \Codeception\PHPUnit\TestCase::assertNotEquals($expected, $actual, $message, 0.0, 10, false, true); + } + + public static function assertEqualsWithDelta($expected, $actual, $delta, $message = '') + { + \Codeception\PHPUnit\TestCase::assertEquals($expected, $actual, $message, $delta, 10, false, false); + } + + public static function assertNotEqualsWithDelta($expected, $actual, $delta, $message = '') + { + \Codeception\PHPUnit\TestCase::assertNotEquals($expected, $actual, $message, $delta, 10, false, false); + } }