mirror of
https://github.com/archtechx/enums.git
synced 2025-12-14 03:14:03 +00:00
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
This commit is contained in:
parent
20fa78c2b1
commit
0c87357a6e
9 changed files with 109 additions and 16 deletions
|
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
|
||||
it('can return an array of case names')
|
||||
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']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue