Code Duplication    Length = 15-15 lines in 3 locations

tests/Test.php 3 locations

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