Controlling a 24V pneumatic valve to arduino?

I'm not familiar with optoisolators. I'll definitely want to test it disconnected from the intended pump first to check everything.
.. as my voltage is 24V I shouldn't damage anything with testing? main thing at this stage is to get it working without damaging the valves electronics.