Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
sstok committed Nov 4, 2023
1 parent f8dd958 commit 62c3ed4
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions tests/Constraints/NotInPasswordCommonListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ protected function createValidator(): ConstraintValidatorInterface
return new NotInPasswordCommonListValidator();
}

/** @test */
public function it_ignores_empty_values(): void
public function test_it_ignores_empty_values(): void
{
$this->validator->validate(null, new NotInPasswordCommonList());
$this->assertNoViolation();
Expand All @@ -51,8 +50,7 @@ public function __toString(): string
$this->assertNoViolation();
}

/** @test */
public function no_violation_for_unlisted_password(): void
public function test_no_violation_for_unlisted_password(): void
{
$this->validator->validate('#*Xqz%<*8wHi', new NotInPasswordCommonList());
$this->assertNoViolation();
Expand All @@ -61,12 +59,8 @@ public function no_violation_for_unlisted_password(): void
$this->assertNoViolation();
}

/**
* @test
*
* @dataProvider provide_unsafe_passwords
*/
public function it_raises_a_violation_for_common_used_password_as_string(string $password): void
/** @dataProvider provide_unsafe_passwords */
public function test_it_raises_a_violation_for_common_used_password_as_string(string $password): void
{
$this->validator->validate($password, $constraint = new NotInPasswordCommonList());

Expand All @@ -76,12 +70,8 @@ public function it_raises_a_violation_for_common_used_password_as_string(string
;
}

/**
* @test
*
* @dataProvider provide_unsafe_passwords
*/
public function it_raises_a_violation_for_common_used_password_as_stringable(string $password): void
/** @dataProvider provide_unsafe_passwords */
public function test_it_raises_a_violation_for_common_used_password_as_stringable(string $password): void
{
$value = new class($password) implements \Stringable {
private string $password;
Expand All @@ -105,9 +95,7 @@ public function __toString(): string
;
}

/**
* @return iterable<int, array{0: string}>
*/
/** @return iterable<int, array{0: string}> */
public function provide_unsafe_passwords(): iterable
{
yield ['hunter'];
Expand Down

0 comments on commit 62c3ed4

Please sign in to comment.