mirror of
https://github.com/archtechx/enums.git
synced 2025-12-12 15:54:04 +00:00
add comment to test
This commit is contained in:
parent
84d56bf843
commit
f52feccd85
1 changed files with 4 additions and 1 deletions
|
|
@ -4,9 +4,12 @@ it('does not override the default BackedEnum from method')
|
||||||
->expect(Status::from(0))
|
->expect(Status::from(0))
|
||||||
->toBe(Status::PENDING);
|
->toBe(Status::PENDING);
|
||||||
|
|
||||||
|
// Shortened exception message due to inconsistency between PHP 8.1 and 8.2+
|
||||||
|
// 8.1: 2 is not a valid backing value for enum "Status"
|
||||||
|
// 8.2+: 2 is not a valid backing value for enum Status
|
||||||
it('does not override the default BackedEnum from method with errors', function () {
|
it('does not override the default BackedEnum from method with errors', function () {
|
||||||
Status::from(2);
|
Status::from(2);
|
||||||
})->throws(ValueError::class, '2 is not a valid backing value for enum Status');
|
})->throws(ValueError::class, '2 is not a valid backing value for enum');
|
||||||
|
|
||||||
it('does not override the default BackedEnum tryFrom method')
|
it('does not override the default BackedEnum tryFrom method')
|
||||||
->expect(Status::tryFrom(1))
|
->expect(Status::tryFrom(1))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue