コード例 #1
0
 public function testGeneratedPasswords()
 {
     $generator = new Generator();
     $oldGeneratedPassword = $generator->generatePassword();
     for ($i = 0; $i < 25; $i++) {
         $newGeneratedPassword = $generator->generatePassword();
         $this->assertNotEquals($oldGeneratedPassword, $newGeneratedPassword);
     }
 }
コード例 #2
0
 /**
  * Loads the generated passwords.
  *
  * @param int $passwordCount   The desired password count.
  *
  * @return void
  */
 protected function loadPasswords($passwordCount = 10)
 {
     for ($i = 0; $i < $passwordCount; $i++) {
         $this->passwords[] = $this->generator->getPassword();
     }
 }