One need not agree with any or all aspects of Roman Catholic theology, to recognize their right to exercise their religion free of interference by the State.
Nobody is free to exercise his religion when the state can show a compelling interest. That’s the Federal case law concerning the First Amendment, and it has been for many years. Clearly LA believes there is a compelling interest to requiring this testimony, or else like many other states, they would have a shield law. They don’t, so the priest will have to accept whatever penalty goes with the exercise of his religion in the face of a compelling interest.