/** * @covers cymapgt\core\application\authentication\UserCredential\UserCredentialManager::validateLength */ public function testValidateLengthException() { $this->setExpectedException('cymapgt\\Exception\\UserCredentialException', 'The password does not meet required length.'); $userProfileWeak = array("username" => "c.ogana", "password" => "tinypw", "fullname" => "Cyril Ogana", "passhash" => "tiger", "passhist" => array(), "policyinfo" => array(), "account_state" => \USERCREDENTIAL_ACCOUNTSTATE_LOGGEDIN); $this->object = new UserCredentialManager($userProfileWeak); $this->object->validateLength(); }