This repository was archived by the owner on Dec 26, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public function wrongKeyProvider()
22
22
* @param string $name
23
23
* @param mixed $value
24
24
*/
25
- public function testEnumMagicConstruction_GoodKey ($ name , $ value )
25
+ public function testMagicConstruction_GoodKey ($ name , $ value )
26
26
{
27
27
/** @var EnumMock $enum */
28
28
$ enum = EnumMock::$ name ();
@@ -36,7 +36,7 @@ public function testEnumMagicConstruction_GoodKey($name, $value)
36
36
* @dataProvider wrongKeyProvider
37
37
* @param string $name
38
38
*/
39
- public function testEnumMagicConstruction_WrongKey ($ name )
39
+ public function testMagicConstruction_WrongKey ($ name )
40
40
{
41
41
$ this ->setExpectedException (
42
42
get_class (new EnumException ()),
@@ -47,6 +47,15 @@ public function testEnumMagicConstruction_WrongKey($name)
47
47
EnumMock::$ name ();
48
48
}
49
49
50
+ public function testComparable ()
51
+ {
52
+ $ this ->assertSame (EnumMock::A (), EnumMock::A ());
53
+ $ this ->assertNotSame (EnumMock::A (), EnumMock::B ());
54
+
55
+ $ this ->assertTrue (EnumMock::A () == EnumMock::A ());
56
+ $ this ->assertFalse (EnumMock::A () == EnumMock::B ());
57
+ }
58
+
50
59
/**
51
60
* @dataProvider goodKeyProvider
52
61
* @param string $name
You can’t perform that action at this time.
0 commit comments