|
@@ 53-68 (lines=16) @@
|
| 50 |
|
}
|
| 51 |
|
|
| 52 |
|
/** @test */
|
| 53 |
|
public function accentedLetterOnly()
|
| 54 |
|
{
|
| 55 |
|
$pw = new Password();
|
| 56 |
|
|
| 57 |
|
$accentedLetter = new Criterias\AccentedLetter();
|
| 58 |
|
|
| 59 |
|
$pw->addCriteria($accentedLetter, new Occurences\Strict(5));
|
| 60 |
|
|
| 61 |
|
$str = $pw->generate();
|
| 62 |
|
|
| 63 |
|
$this->assertNotEmpty($str);
|
| 64 |
|
|
| 65 |
|
$this->assertEquals(5, mb_strlen($str));
|
| 66 |
|
|
| 67 |
|
$this->assertRegExp('/[' . implode($accentedLetter->handle()) . ']{5}/', $str);
|
| 68 |
|
}
|
| 69 |
|
|
| 70 |
|
/** @test */
|
| 71 |
|
public function accentedUppercaseLetterOnly()
|
|
@@ 71-86 (lines=16) @@
|
| 68 |
|
}
|
| 69 |
|
|
| 70 |
|
/** @test */
|
| 71 |
|
public function accentedUppercaseLetterOnly()
|
| 72 |
|
{
|
| 73 |
|
$pw = new Password();
|
| 74 |
|
|
| 75 |
|
$accentedUppercaseLetter = new Criterias\AccentedUppercaseLetter();
|
| 76 |
|
|
| 77 |
|
$pw->addCriteria($accentedUppercaseLetter, new Occurences\Strict(5));
|
| 78 |
|
|
| 79 |
|
$str = $pw->generate();
|
| 80 |
|
|
| 81 |
|
$this->assertNotEmpty($str);
|
| 82 |
|
|
| 83 |
|
$this->assertEquals(5, mb_strlen($str));
|
| 84 |
|
|
| 85 |
|
$this->assertRegExp('/[' . implode($accentedUppercaseLetter->handle()) . ']{5}/', $str);
|
| 86 |
|
}
|
| 87 |
|
|
| 88 |
|
/** @test */
|
| 89 |
|
public function specialCharacterOnly()
|