public function testPossibleGenSalt() { $password = '******'; $user = $this->dataUser->createEmpty(); $user->set('username', 'user1'); $user->set('password', $password); $user->set('email', '*****@*****.**'); $this->dataUser->create($user); $userSetup = new UserSetup(); $salt = 'test'; $read = $userSetup->possibleGenSalt($salt, $user, 'salt'); $this->assertFalse($read); $salt = null; $read = $userSetup->possibleGenSalt($salt, $user, 'salt'); $this->assertTrue($read); $read = $user->get('salt'); $this->assertNotEmpty($read); }