Skip to content

Commit

Permalink
test: CodeGenerator.php
Browse files Browse the repository at this point in the history
  • Loading branch information
a1383n committed Jan 15, 2024
1 parent 0ee282d commit 994b52a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Unit/ExampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
->sequence(
fn ($code, $length) => $code->toHaveLength((int)$length->value),
fn ($code) => match ($type) {
OneTimePasswordCodeType::DIGIT => $code->toBeDigits(),
OneTimePasswordCodeType::ALPHA => $code->toBeAlpha(),
OneTimePasswordCodeType::DIGIT => is_string($code) ? expect($code)->toBeDigits() : $code->toBeDigits(),
OneTimePasswordCodeType::ALPHA => is_string($code) ? expect($code)->toBeAlpha() : $code->toBeAlpha(),
}
);
})
Expand Down

0 comments on commit 994b52a

Please sign in to comment.