We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ee282d commit 994b52aCopy full SHA for 994b52a
tests/Unit/ExampleTest.php
@@ -14,8 +14,8 @@
14
->sequence(
15
fn ($code, $length) => $code->toHaveLength((int)$length->value),
16
fn ($code) => match ($type) {
17
- OneTimePasswordCodeType::DIGIT => $code->toBeDigits(),
18
- OneTimePasswordCodeType::ALPHA => $code->toBeAlpha(),
+ OneTimePasswordCodeType::DIGIT => is_string($code) ? expect($code)->toBeDigits() : $code->toBeDigits(),
+ OneTimePasswordCodeType::ALPHA => is_string($code) ? expect($code)->toBeAlpha() : $code->toBeAlpha(),
19
}
20
);
21
})
0 commit comments