|
29 | 29 | assert_eq(IntegrationTest\PureEnum::getDescription(), 'Pure enum implementation', 'PureEnum::getDescription() should return proper value'); |
30 | 30 |
|
31 | 31 | // Test direct access to enum members |
32 | | -assert_eq(IntegrationTest\PureEnum::ONE->name, 'ONE'); |
33 | | -assert_eq(IntegrationTest\PureEnum::TWO->name, 'TWO'); |
34 | | -assert_eq(IntegrationTest\PureEnum::THREE->name, 'THREE'); |
| 32 | +assert_eq((IntegrationTest\PureEnum::ONE)->name, 'ONE'); |
| 33 | +assert_eq((IntegrationTest\PureEnum::TWO)->name, 'TWO'); |
| 34 | +assert_eq((IntegrationTest\PureEnum::THREE)->name, 'THREE'); |
35 | 35 |
|
36 | 36 | // Test int-backed enum |
37 | 37 | assert_true(enum_exists('IntegrationTest\IntEnum'), 'IntEnum should exist'); |
38 | | -assert_eq(IntegrationTest\IntEnum::LOW->value, 1, 'IntEnum::LOW value should be 1'); |
39 | | -assert_eq(IntegrationTest\IntEnum::MEDIUM->value, 5, 'IntEnum::MEDIUM value should be 5'); |
40 | | -assert_eq(IntegrationTest\IntEnum::HIGH->value, 10, 'IntEnum::HIGH value should be 10'); |
| 38 | +assert_eq((IntegrationTest\IntEnum::LOW)->value, 1, 'IntEnum::LOW value should be 1'); |
| 39 | +assert_eq((IntegrationTest\IntEnum::MEDIUM)->value, 5, 'IntEnum::MEDIUM value should be 5'); |
| 40 | +assert_eq((IntegrationTest\IntEnum::HIGH)->value, 10, 'IntEnum::HIGH value should be 10'); |
41 | 41 |
|
42 | 42 | // Test string-backed enum |
43 | 43 | assert_true(enum_exists('IntegrationTest\StringEnum'), 'StringEnum should exist'); |
44 | | -assert_eq(IntegrationTest\StringEnum::RED->value, 'FF0000', 'StringEnum::RED value should be FF0000'); |
45 | | -assert_eq(IntegrationTest\StringEnum::GREEN->value, '00FF00', 'StringEnum::GREEN value should be 00FF00'); |
46 | | -assert_eq(IntegrationTest\StringEnum::BLUE->value, '0000FF', 'StringEnum::BLUE value should be 0000FF'); |
| 44 | +assert_eq((IntegrationTest\StringEnum::RED)->value, 'FF0000', 'StringEnum::RED value should be FF0000'); |
| 45 | +assert_eq((IntegrationTest\StringEnum::GREEN)->value, '00FF00', 'StringEnum::GREEN value should be 00FF00'); |
| 46 | +assert_eq((IntegrationTest\StringEnum::BLUE)->value, '0000FF', 'StringEnum::BLUE value should be 0000FF'); |
47 | 47 |
|
48 | 48 | // Test reflection API |
49 | 49 | $reflection = new ReflectionEnum(IntegrationTest\StringEnum::class); |
|
0 commit comments