Skip to content

Commit 994b52a

Browse files
committed
test: CodeGenerator.php
1 parent 0ee282d commit 994b52a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Unit/ExampleTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
->sequence(
1515
fn ($code, $length) => $code->toHaveLength((int)$length->value),
1616
fn ($code) => match ($type) {
17-
OneTimePasswordCodeType::DIGIT => $code->toBeDigits(),
18-
OneTimePasswordCodeType::ALPHA => $code->toBeAlpha(),
17+
OneTimePasswordCodeType::DIGIT => is_string($code) ? expect($code)->toBeDigits() : $code->toBeDigits(),
18+
OneTimePasswordCodeType::ALPHA => is_string($code) ? expect($code)->toBeAlpha() : $code->toBeAlpha(),
1919
}
2020
);
2121
})

0 commit comments

Comments
 (0)