| 1 | <?php |
||
| 9 | class TopologyTest extends TestCase |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @dataProvider topologies |
||
| 13 | */ |
||
| 14 | public function test_it_can_validate_a_topology($format, $password) |
||
| 15 | { |
||
| 16 | self::expectException(InvalidPassword::class); |
||
| 17 | |||
| 18 | $topology = new Topology($format); |
||
| 19 | |||
| 20 | $topology($password); |
||
| 21 | } |
||
| 22 | |||
| 23 | public function topologies() |
||
| 24 | { |
||
| 25 | return [ |
||
| 26 | 'using lowercase' => ['lll', 'abc'], |
||
| 27 | 'using uppercase' => ['uuu', 'ABC'], |
||
| 28 | 'using digits' => ['ddd', '123'], |
||
| 29 | 'using symbols' => ['sss', '!@#'], |
||
| 30 | 'using mixed' => ['ulds', 'Ab1!'], |
||
| 31 | ]; |
||
| 32 | } |
||
| 33 | } |
||
| 34 |