For test purposes you will need a small transformer (or a resistor, bridge and an optocoupler, example 4N25) to create isolated zero-crossing reference ..
If you go for a small transformer (5-6Vac) connect a bridge to recify voltage and this will give you 100Hz. From this signal you will need to creat short pulses as clos to 0V as possible. This can be done by connecting a npn transistor to this signal (base resistor ≈10kΩ) and getting almost square wave at its collector. This signal can be fed to PIC microcontroller as reference for phase angle calculations ..
Once you have this reference you can continue testing this circuit using isolated PIC circuit (assuming that you use MOC to provide isolation from the triac's gate) ..
Regards,
IanP