Ejemplo n.º 1
0
 public function testNeedsRehashing()
 {
     $boxPassword = new Box_Password();
     $password = '******';
     $hash = $boxPassword->hashIt($password);
     $this->assertInternalType('string', $hash);
     $this->assertNotEmpty($hash);
     $newOptions = array('cost' => 15);
     $boxPassword->setOptions($newOptions);
     $needRehashing = $boxPassword->needsRehash($hash);
     $this->assertInternalType('bool', $needRehashing);
     $this->assertTrue($needRehashing);
 }