@@ -23,16 +23,16 @@ public function testFeedbackForEmptyPassword(): void
2323 {
2424 $ feedback = $ this ->feedback ->getFeedback (0 , []);
2525
26- $ this ->assertSame ('' , $ feedback ['warning ' ], " default warning " );
26+ $ this ->assertSame ('' , $ feedback ['warning ' ], ' default warning ' );
2727 $ this ->assertContains (
2828 'Use a few words, avoid common phrases ' ,
2929 $ feedback ['suggestions ' ],
30- " default suggestion #1 "
30+ ' default suggestion #1 '
3131 );
3232 $ this ->assertContains (
3333 'No need for symbols, digits, or uppercase letters ' ,
3434 $ feedback ['suggestions ' ],
35- " default suggestion #1 "
35+ ' default suggestion #1 '
3636 );
3737 }
3838
@@ -41,52 +41,52 @@ public function testHighScoringSequence(): void
4141 $ match = new Bruteforce ('a ' , 0 , 1 , 'a ' );
4242 $ feedback = $ this ->feedback ->getFeedback (3 , [$ match ]);
4343
44- $ this ->assertSame ('' , $ feedback ['warning ' ], " no warning for good score " );
45- $ this ->assertEmpty ($ feedback ['suggestions ' ], " no suggestions for good score " );
44+ $ this ->assertSame ('' , $ feedback ['warning ' ], ' no warning for good score ' );
45+ $ this ->assertEmpty ($ feedback ['suggestions ' ], ' no suggestions for good score ' );
4646 }
4747
4848 public function testLongestMatchGetsFeedback (): void
4949 {
5050 $ match1 = new SequenceMatch ('abcd26-01-1991 ' , 0 , 4 , 'abcd ' );
5151 $ match2 = new DateMatch ('abcd26-01-1991 ' , 4 , 14 , '26-01-1991 ' , [
52- 'day ' => 26 ,
53- 'month ' => 1 ,
54- 'year ' => 1991 ,
52+ 'day ' => 26 ,
53+ 'month ' => 1 ,
54+ 'year ' => 1991 ,
5555 'separator ' => '- ' ,
5656 ]);
5757 $ feedback = $ this ->feedback ->getFeedback (1 , [$ match1 , $ match2 ]);
5858
5959 $ this ->assertSame (
6060 'Dates are often easy to guess ' ,
6161 $ feedback ['warning ' ],
62- " warning provided for the longest match "
62+ ' warning provided for the longest match '
6363 );
6464 $ this ->assertContains (
6565 'Avoid dates and years that are associated with you ' ,
6666 $ feedback ['suggestions ' ],
67- " suggestion provided for the longest match "
67+ ' suggestion provided for the longest match '
6868 );
6969 $ this ->assertNotContains (
7070 'Avoid sequences ' ,
7171 $ feedback ['suggestions ' ],
72- " no suggestion provided for the shorter match "
72+ ' no suggestion provided for the shorter match '
7373 );
7474 }
7575
7676 public function testDefaultSuggestion (): void
7777 {
7878 $ match = new DateMatch ('26-01-1991 ' , 0 , 10 , '26-01-1991 ' , [
79- 'day ' => 26 ,
80- 'month ' => 1 ,
81- 'year ' => 1991 ,
79+ 'day ' => 26 ,
80+ 'month ' => 1 ,
81+ 'year ' => 1991 ,
8282 'separator ' => '- ' ,
8383 ]);
8484 $ feedback = $ this ->feedback ->getFeedback (1 , [$ match ]);
8585
8686 $ this ->assertContains (
8787 'Add another word or two. Uncommon words are better. ' ,
8888 $ feedback ['suggestions ' ],
89- " default suggestion provided "
89+ ' default suggestion provided '
9090 );
9191 $ this ->assertCount (2 , $ feedback ['suggestions ' ], "default suggestion doesn\'t override existing suggestion " );
9292 }
@@ -96,11 +96,11 @@ public function testBruteforceFeedback(): void
9696 $ match = new Bruteforce ('qkcriv ' , 0 , 6 , 'qkcriv ' );
9797 $ feedback = $ this ->feedback ->getFeedback (1 , [$ match ]);
9898
99- $ this ->assertSame ('' , $ feedback ['warning ' ], " bruteforce match has no warning " );
99+ $ this ->assertSame ('' , $ feedback ['warning ' ], ' bruteforce match has no warning ' );
100100 $ this ->assertSame (
101101 ['Add another word or two. Uncommon words are better. ' ],
102102 $ feedback ['suggestions ' ],
103- " bruteforce match only has the default suggestion "
103+ ' bruteforce match only has the default suggestion '
104104 );
105105 }
106106}
0 commit comments