diff --git a/tests/unit/Framework/Constraint/StringEndsWithTest.php b/tests/unit/Framework/Constraint/StringEndsWithTest.php index 481cf3e0d6c..2a997f65a9a 100644 --- a/tests/unit/Framework/Constraint/StringEndsWithTest.php +++ b/tests/unit/Framework/Constraint/StringEndsWithTest.php @@ -17,15 +17,31 @@ class StringEndsWithTest extends ConstraintTestCase public function testConstraintStringEndsWithCorrectValueAndReturnResult(): void { $constraint = new StringEndsWith('suffix'); + $this->assertTrue($constraint->evaluate('foosuffix', '', true)); } public function testConstraintStringEndsWithNotCorrectValueAndReturnResult(): void { $constraint = new StringEndsWith('suffix'); + $this->assertFalse($constraint->evaluate('suffixerror', '', true)); } + public function testConstraintStringEndsWithCorrectNumericValueAndReturnResult(): void + { + $constraint = new StringEndsWith('0E1'); + + $this->assertTrue($constraint->evaluate('zzz0E1', '', true)); + } + + public function testConstraintStringEndsWithNotCorrectNumericValueAndReturnResult(): void + { + $constraint = new StringEndsWith('0E1'); + + $this->assertFalse($constraint->evaluate('zzz0E2', '', true)); + } + public function testConstraintStringEndsWithToStringMethod(): void { $constraint = new StringEndsWith('suffix');