password_hash: Add tests to allow refactoring