Code Duplication    Length = 15-15 lines in 3 locations

tests/IntegrationTest.php 3 locations

@@ 289-303 (lines=15) @@
286
    }
287
288
    /** @test */
289
    public function complexStrictPerfectScore()
290
    {
291
        $string = '123abcABC[&+àáâÀÁÂ';
292
293
        $password = new Password();
294
295
        $password->addCriteria(new Dictionaries\Digit(), new Occurrences\Strict(3));
296
        $password->addCriteria(new Dictionaries\Letter(), new Occurrences\Strict(3));
297
        $password->addCriteria(new Dictionaries\UppercaseLetter(), new Occurrences\Strict(3));
298
        $password->addCriteria(new Dictionaries\SpecialCharacter(), new Occurrences\Strict(3));
299
        $password->addCriteria(new Dictionaries\AccentedLetter(), new Occurrences\Strict(3));
300
        $password->addCriteria(new Dictionaries\AccentedUppercaseLetter(), new Occurrences\Strict(3));
301
302
        $this->assertEquals($password->score($string), 100);
303
    }
304
305
    /** @test */
306
    public function complexStrictIncompleteScore()
@@ 306-320 (lines=15) @@
303
    }
304
305
    /** @test */
306
    public function complexStrictIncompleteScore()
307
    {
308
        $string = '12abcAB[&+àáâÀÁÂ';
309
310
        $password = new Password();
311
312
        $password->addCriteria(new Dictionaries\Digit(), new Occurrences\Strict(3));
313
        $password->addCriteria(new Dictionaries\Letter(), new Occurrences\Strict(3));
314
        $password->addCriteria(new Dictionaries\UppercaseLetter(), new Occurrences\Strict(3));
315
        $password->addCriteria(new Dictionaries\SpecialCharacter(), new Occurrences\Strict(3));
316
        $password->addCriteria(new Dictionaries\AccentedLetter(), new Occurrences\Strict(3));
317
        $password->addCriteria(new Dictionaries\AccentedUppercaseLetter(), new Occurrences\Strict(3));
318
319
        $this->assertEquals($password->score($string), 67);
320
    }
321
322
    /** @test */
323
    public function complexMixedPerfectScore()
@@ 323-337 (lines=15) @@
320
    }
321
322
    /** @test */
323
    public function complexMixedPerfectScore()
324
    {
325
        $string = '123abcdEFG[&+éèàÒÓÔ';
326
327
        $password = new Password();
328
329
        $password->addCriteria(new Dictionaries\Digit(), new Occurrences\Strict(3));
330
        $password->addCriteria(new Dictionaries\Letter(), new Occurrences\Between(3, 5));
331
        $password->addCriteria(new Dictionaries\UppercaseLetter(), new Occurrences\Strict(3));
332
        $password->addCriteria(new Dictionaries\SpecialCharacter(), new Occurrences\Between(3, 5));
333
        $password->addCriteria(new Dictionaries\AccentedLetter(), new Occurrences\Strict(3));
334
        $password->addCriteria(new Dictionaries\AccentedUppercaseLetter(), new Occurrences\Between(3, 5));
335
336
        $this->assertEquals($password->score($string), 100);
337
    }
338
339
    /** @test */
340
    public function checkLettersParticularities()