@@ -162,9 +162,9 @@ public function testFalseForSensibleMatch(): void
162
162
* $config->maxSimilarity = 50; is the highest setting where all tests pass.
163
163
*/
164
164
#[DataProvider('provideIsNotPersonalFalsePositivesCaughtByIsNotSimilar ' )]
165
- public function testIsNotPersonalFalsePositivesCaughtByIsNotSimilar (mixed $ password ): void
165
+ public function testIsNotPersonalFalsePositivesCaughtByIsNotSimilar (string $ password ): void
166
166
{
167
- new User ([
167
+ $ user = new User ([
168
168
'username ' => 'CaptainJoe ' ,
169
169
'email ' => 'JosephSmith@example.com ' ,
170
170
]);
@@ -173,16 +173,19 @@ public function testIsNotPersonalFalsePositivesCaughtByIsNotSimilar(mixed $passw
173
173
$ config ->maxSimilarity = 50 ;
174
174
$ this ->validator = new NothingPersonalValidator ($ config );
175
175
176
- $ isNotPersonal = $ this -> getPrivateMethodInvoker ($ this ->validator , 'isNotPersonal ' );
176
+ $ isNotPersonal = self :: getPrivateMethodInvoker ($ this ->validator , 'isNotPersonal ' );
177
177
178
- $ isNotSimilar = $ this -> getPrivateMethodInvoker ($ this ->validator , 'isNotSimilar ' );
178
+ $ isNotSimilar = self :: getPrivateMethodInvoker ($ this ->validator , 'isNotSimilar ' );
179
179
180
- $ this ->assertNotSame ($ isNotPersonal , $ isNotSimilar );
180
+ $ this ->assertNotSame ($ isNotPersonal( $ password , $ user ), $ isNotSimilar( $ password , $ user ) );
181
181
}
182
182
183
+ /**
184
+ * @return iterable<int, array{0: string}>
185
+ */
183
186
public static function provideIsNotPersonalFalsePositivesCaughtByIsNotSimilar (): iterable
184
187
{
185
- return [
188
+ yield from [
186
189
['JoeTheCaptain ' ],
187
190
['JoeCaptain ' ],
188
191
['CaptainJ ' ],
0 commit comments