When the person informed against is brought before the magistrate, if the charge be controverted, the magistrate shall take testimony in relation thereto. The evidence shall be reduced to writing and subscribed by the witnesses. The magistrate may, in his or her discretion, order the testimony and proceedings to be taken down in shorthand, and for that purpose he or she may appoint a shorthand reporter. The deposition or testimony of the witnesses shall be authenticated in the form prescribed in Section 869.