Skip to content

Commit

Permalink
ci: Fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Nov 15, 2024
1 parent c3e681f commit affe5cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/lib/Validator/CommonPasswordsValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected function setUp(): void {
/**
* @dataProvider dataValidate
*/
public function testValidate(string $password, bool $enforced, bool $valid) {
public function testValidate(string $password, bool $enforced, bool $valid): void {
$this->config->method('getEnforceNonCommonPassword')
->willReturn($enforced);

Expand All @@ -49,15 +49,15 @@ public function testValidate(string $password, bool $enforced, bool $valid) {
$this->validator->validate($password);
}

public static function dataValidate() {
public static function dataValidate(): array {
$attempts = [
['banana', false, true],
['bananabananabananabanana', false, true],
['banana', true, false],
['bananabananabananabanana', true, true],
];
for ($i = 1; $i <= 39; $i++) {
$attempts[] = [str_repeat('$', $i), true, true];
$attempts[] = [str_repeat('$', $i), true, $i !== 6];
}
return $attempts;
}
Expand Down

0 comments on commit affe5cf

Please sign in to comment.