File tree 2 files changed +0
-49
lines changed
2 files changed +0
-49
lines changed Original file line number Diff line number Diff line change @@ -81,18 +81,6 @@ public function __wakeup()
81
81
}
82
82
}
83
83
84
- /**
85
- * Compares one Enum with another.
86
- *
87
- * This method is final, for more information read https://github.com/myclabs/php-enum/issues/4
88
- *
89
- * @return bool True if Enums are equal, false if not equal
90
- */
91
- final public function equals (Enum $ enum )
92
- {
93
- return $ this ->getValue () === $ enum ->getValue () && get_called_class () == get_class ($ enum );
94
- }
95
-
96
84
/**
97
85
* Returns the names (keys) of all constants in the Enum class
98
86
*
Original file line number Diff line number Diff line change @@ -201,20 +201,6 @@ public function searchProvider() {
201
201
);
202
202
}
203
203
204
- /**
205
- * equals()
206
- */
207
- public function testEquals ()
208
- {
209
- $ foo = EnumFixture::FOO ();
210
- $ number = EnumFixture::NUMBER ();
211
- $ anotherFoo = EnumFixture::FOO ();
212
-
213
- $ this ->assertTrue ($ foo ->equals ($ foo ));
214
- $ this ->assertFalse ($ foo ->equals ($ number ));
215
- $ this ->assertTrue ($ foo ->equals ($ anotherFoo ));
216
- }
217
-
218
204
/**
219
205
* __callStatic()
220
206
*/
@@ -226,29 +212,6 @@ public function testSameInstance()
226
212
$ this ->assertSame ($ foo1 , $ foo2 );
227
213
}
228
214
229
- /**
230
- * equals()
231
- */
232
- public function testEqualsComparesProblematicValuesProperly ()
233
- {
234
- $ false = EnumFixture::PROBLEMATIC_BOOLEAN_FALSE ();
235
- $ emptyString = EnumFixture::PROBLEMATIC_EMPTY_STRING ();
236
- $ null = EnumFixture::PROBLEMATIC_NULL ();
237
-
238
- $ this ->assertTrue ($ false ->equals ($ false ));
239
- $ this ->assertFalse ($ false ->equals ($ emptyString ));
240
- $ this ->assertFalse ($ emptyString ->equals ($ null ));
241
- $ this ->assertFalse ($ null ->equals ($ false ));
242
- }
243
-
244
- /**
245
- * equals()
246
- */
247
- public function testEqualsConflictValues ()
248
- {
249
- $ this ->assertFalse (EnumFixture::FOO ()->equals (EnumConflict::FOO ()));
250
- }
251
-
252
215
/**
253
216
* fromKey()
254
217
*/
You can’t perform that action at this time.
0 commit comments