Skip to content

Commit cfbde7a

Browse files
committed
Refactor test per suggestions by @mirfilip
1 parent 52195a0 commit cfbde7a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tests/EnumTest.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,17 @@ public function searchProvider() {
214214
);
215215
}
216216

217+
/**
218+
* equals()
219+
*/
217220
public function testEquals()
218221
{
219-
$enum = new EnumFixture(EnumFixture::FOO);
220-
$this->assertTrue($enum->equals(EnumFixture::FOO()));
222+
$foo = new EnumFixture(EnumFixture::FOO);
223+
$number = new EnumFixture(EnumFixture::NUMBER);
224+
$anotherFoo = new EnumFixture(EnumFixture::FOO);
221225

222-
$enum = new EnumFixture(EnumFixture::PROBLEMATIC_BOOLEAN_FALSE);
223-
$this->assertFalse($enum->equals(EnumFixture::PROBLEMATIC_EMPTY_STRING()));
226+
$this->assertTrue($foo->equals($foo));
227+
$this->assertFalse($foo->equals($number));
228+
$this->assertTrue($foo->equals($anotherFoo));
224229
}
225230
}

0 commit comments

Comments
 (0)