Skip to content

Commit f55d8ae

Browse files
committed
Fix tests since SpatialMatch support AZERTY keyboard layout
1 parent 36cf0e6 commit f55d8ae

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/Matchers/SpatialTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ public function testShiftedCountForMultipleMatches(): void
121121
"shifted count is correct for two matches in a row",
122122
SpatialMatch::match($password),
123123
'spatial',
124-
['!QAZ', '1qaz'],
125-
[[0, 3], [4, 7]],
124+
['!QAZ', 'QAZ', '1qaz', 'qaz'],
125+
[[0, 3], [1, 3], [4, 7], [5, 7]],
126126
[
127-
'graph' => ['qwerty', 'qwerty'],
128-
'turns' => [1, 1],
129-
'shiftedCount' => [4, 0],
127+
'graph' => ['qwerty', 'azerty', 'qwerty', 'azerty'],
128+
'turns' => [1, 2, 1, 2],
129+
'shiftedCount' => [4, 2, 0, 0],
130130
]
131131
);
132132
}

test/ZxcvbnTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ public function sanityCheckDataProvider()
7474
return [
7575
['password', 0, ['dictionary',], 'less than a second', 3],
7676
['65432', 0, ['sequence',], 'less than a second', 101],
77-
['sdfgsdfg', 1, ['repeat',], 'less than a second', 2595],
77+
['sdfgsdfg', 0, ['repeat',], 'less than a second', 459.00000000299997],
7878
['fortitude', 1, ['dictionary',], '1 second', 11308],
7979
['dfjkym', 1, ['bruteforce',], '2 minutes', 1000001],
8080
['fortitude22', 2, ['dictionary', 'repeat',], '2 minutes', 1140700],
8181
['absoluteadnap', 2, ['dictionary', 'dictionary',], '25 minutes', 15187504],
8282
['knifeandspoon', 3, ['dictionary', 'dictionary', 'dictionary'], '1 day', 1108057600],
8383
['h1dden_26191', 3, ['dictionary', 'bruteforce', 'date'], '3 days', 2730628000],
84-
['4rfv1236yhn!', 4, ['spatial', 'sequence', 'bruteforce'], '1 month', 38980000000],
84+
['4rfv1236yhn!', 3, ['spatial', 'sequence', 'bruteforce'], '8 days', 6940000000.045],
8585
['BVidSNqe3oXVyE1996', 4, ['bruteforce', 'regex',], 'centuries', 10000000000010000],
8686
];
8787
}

0 commit comments

Comments
 (0)