/** * Function to be run before every test*() functions. */ public function setUp() { BasicPasswordManagement::$hashAlgo = "haval256,5"; //choose a hashing algo. User::newUserObject("rash", 'testing', "*****@*****.**"); //create a new user. User::activateAccount("rash"); //activate the user account $this->obj = User::existingUserObject("rash", "testing"); //get the user object $this->xobj = new XUser($this->obj); //get the XUser object }
/** * Function to be run before every test*() functions. */ public function setUp() { BasicPasswordManagement::$hashAlgo = "haval256,5"; //choose salting algo. User::newUserObject("rash", 'testing', "*****@*****.**"); //create a user. User::activateAccount("rash"); //activate the user account $this->user = User::existingUserObject("rash", "testing"); //get the user object $this->obj = new AdvancedPasswordManagement($this->user->getUserID(), 'testing'); //create object to AdvancedPasswordManagement class. }
/** * Function to test if allows to create a user with an Null ID * @expectedException phpsec\UserIDInvalid */ public function testUserIDNull() { BasicPasswordManagement::$hashAlgo = "haval256,5"; //choose a hashing algo User::newUserObject(null, 'testing', "*****@*****.**"); //create a new user }