コード例 #1
0
 /**
  * @covers cymapgt\core\application\authentication\UserCredential\UserCredentialManager::validatePolicy
  */
 public function testValidatePolicyPasswordExpiredException()
 {
     $this->setExpectedException('cymapgt\\Exception\\UserCredentialException', 'The password has expired and must be changed');
     $userProfile = array("username" => "c.ogana", "password" => "m&\$1eLe6Ke()", "fullname" => "Cyril Ogana", "passhash" => "tiger", "passhist" => array(), "policyinfo" => array('failed_attempt_count' => 0, 'password_last_changed_datetime' => new \DateTime('2014-03-01'), 'last_login_attempt_datetime' => new \DateTime('2014-03-01 23:45:10')), "account_state" => \USERCREDENTIAL_ACCOUNTSTATE_LOGGEDIN);
     $this->object = new UserCredentialManager($userProfile);
     $this->object->validatePolicy();
 }