A California law prohibiting mental health providers from counseling gay minors on how to become straight faces its first legal test Friday.