A Co Donegal man who got somebody else to sit his driver theory test so he could obtain a provisional licence has received a suspended jail sentence.