This depends very much on how accurate you want to model the PD behavior.
The simplest would be to use a function generator and a resistor.
This works if your PD is zero voltage biased and your circuit can work with either side of the PD being at Earth ground as that's where your function generator ground will usually be at.
You are of course missing quite a few secondary effects of the PD, such as junction capacitance and non-linear behavior if voltage develops due to the TIA not maintaining the zero bias (during transients).
The latter also affects the accuracy of the current. To minimize the effect, you should set the output voltage of the function generator as high as possible and then adjust for the desired current by picking larger resistor values (ideal current sources have infinite source resistance and infinite compliance voltage).
That being said there are many PD configurations where what I described would not work, so we would need to see your schematics.