1
0
Fork 0
mirror of https://github.com/archtechx/enums.git synced 2025-12-12 19:24:04 +00:00
enums/tests/Pest/NamesTest.php
Samuel Levy 0c87357a6e
Extend functionality to work with pure enums (#6)
* Extend functionality to work with pure enums

* Code review changes

Altered `::values()` to act like `::names()` for backed enums, code style fixes, general cleanups
2022-03-23 21:42:35 +01:00

9 lines
245 B
PHP

<?php
it('can return an array of case names from backed enums')
->expect(Status::names())
->toBe(['PENDING', 'DONE']);
it('can return an array of case names from pure enums')
->expect(Role::names())
->toBe(['ADMIN', 'GUEST']);