mirror of
https://github.com/archtechx/enums.git
synced 2025-12-12 19:24:04 +00:00
Extend functionality to work with pure enums
This commit is contained in:
parent
20fa78c2b1
commit
c2f0e7faf7
8 changed files with 99 additions and 15 deletions
|
|
@ -1,7 +1,13 @@
|
|||
<?php
|
||||
|
||||
it('can return an associative array of options')
|
||||
it('can return an associative array of options from a backed enum')
|
||||
->expect(Status::options())->toBe([
|
||||
'PENDING' => 0,
|
||||
'DONE' => 1,
|
||||
]);
|
||||
|
||||
it('can return an indexed array of options from a pure enum')
|
||||
->expect(Role::options())->toBe([
|
||||
0 => 'ADMIN',
|
||||
1 => 'GUEST',
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue