public function testGeneratedPasswords() { $generator = new Generator(); $oldGeneratedPassword = $generator->generatePassword(); for ($i = 0; $i < 25; $i++) { $newGeneratedPassword = $generator->generatePassword(); $this->assertNotEquals($oldGeneratedPassword, $newGeneratedPassword); } }
/** * 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(); } }