Cal. Civ. Proc. Code § 2002
The testimony of witnesses is taken in three modes:
1. By affidavit;
2. By deposition;
3. By oral examination.