Skip to content

Commit

Permalink
Test int backed enums
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed May 15, 2024
1 parent 0f5efa1 commit a158bdc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/HasParametersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public function testList(): void
$result = Basic::in([Framework::Laravel]);
$this->assertSame('Tests\\Middleware\\Basic:laravel', $result);

$result = Basic::in([IntEnum::Laravel]);
$this->assertSame('Tests\\Middleware\\Basic:1', $result);

$result = Basic::in(['laravel', 'vue']);
$this->assertSame('Tests\\Middleware\\Basic:laravel,vue', $result);

Expand Down Expand Up @@ -425,3 +428,8 @@ enum Framework: string
case Tailwind = 'tailwind';
case React = 'react';
}

enum IntEnum: int
{
case Laravel = 1;
}

0 comments on commit a158bdc

Please sign in to comment.