2 ms·
Yup, that works. Or the functions check to see if they've been passed something, and if not then they use the singleton. So long as you can choose when to cal
by AndrewDucker 15y ago
Yup, that works.
Or the functions check to see if they've been passed something, and if not then they use the singleton.
So long as you can choose when to call it with an actual database link, and when to call it with a fake one your code is all perfectly testable.