We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
equals()
1 parent 6f18cce commit cca2cafCopy full SHA for cca2caf
tests/EnumTest.php
@@ -227,4 +227,19 @@ public function testEquals()
227
$this->assertFalse($foo->equals($number));
228
$this->assertTrue($foo->equals($anotherFoo));
229
}
230
+
231
+ /**
232
+ * equals()
233
+ */
234
+ public function testEqualsComparesProblematicValuesProperly()
235
+ {
236
+ $false = new EnumFixture(EnumFixture::PROBLEMATIC_BOOLEAN_FALSE);
237
+ $emptyString = new EnumFixture(EnumFixture::PROBLEMATIC_EMPTY_STRING);
238
+ $null = new EnumFixture(EnumFixture::PROBLEMATIC_NULL);
239
240
+ $this->assertTrue($false->equals($false));
241
+ $this->assertFalse($false->equals($emptyString));
242
+ $this->assertFalse($emptyString->equals($null));
243
+ $this->assertFalse($null->equals($false));
244
+ }
245
0 commit comments