Пример #1
0
 public function testNewPassword()
 {
     $this->user->login('pablo', 456);
     $this->assertTrue($this->user->log->hasError());
     $this->assertFalse($this->user->isSigned());
     $result = $this->user->resetPassword('*****@*****.**');
     $this->assertInstanceOf('ptejada\\uFlex\\Collection', $result);
     $this->assertFalse($this->user->log->hasError());
     $newPassword = array('Password' => 456, 'Password2' => 789);
     $this->user->newPassword($result->Confirmation, $newPassword);
     $this->assertTrue($this->user->log->hasError());
     $newPassword['Password2'] = 456;
     $this->user->newPassword('c4504f0b39c478f39c4badbf74ddbaedf71ecfae', $newPassword);
     $this->assertTrue($this->user->log->hasError());
     $this->user->newPassword($result->Confirmation, $newPassword);
     $this->assertFalse($this->user->log->hasError());
     // Test the new login credentials
     $this->user->login('pablo', 456);
     $this->assertFalse($this->user->log->hasError());
     $this->assertTrue($this->user->isSigned());
 }