A learner driver give his provisional licence to another man who then turned up to take the test for him, a court has heard.
But before the fake learner could get behind the wheel the scam was spotted by eagle-eyed staff at the test centre.
The holder of the licence, Hisham Mohammad Daghmoush, was spoken to and denied giving his licence to anyone and said he had no idea why anyone would have attended his test appointment.
But the 37-year-old was convicted following a trial at Swansea Magistrates' Court last month and was committed to Swansea Crown Court for sentence.
The court heard that at 4pm on December 20, 2018, a man turned up at the Swansea driving centre to take a test booked in the name of Daghmoush.
David Singh, prosecuting, said the man had the defendant's provisional licence but staff suspected the attendee was not the same person as the licence holder.
He said: "The attendee was asked to account for the fact his appearance differed from the photograph on the licence. He said it was an old photograph."
The barrister said staff were not convinced and also noticed the signature on the licence did not match the signature than man had just put on a document.
The attendee then left the centre and the Driver and Vehicle Standards Agency (DVSA) began an investigation.
Mr Singh said the defendant was interviewed in the April of 2019 and told investigators that he had been in hospital on the date of his driving test. When shown an image of the person who attended the centre for his appointment said he could not identify him and could not explain how he came to be in possession of the provisional licence. When asked how he would have taken the test when he speaks neither English nor Welsh the Syrian refugee replied that he would have done it from memory.
The barrister said at no stage had the defendant's provisional licence been reported lost or stolen and as Daghmoush now holds a full licence he must have had possession of the provisional one again before he took his test in Southampton.
The court heard the circumstances of the Southampton test had been "investigated at some length" and no charges arose from them.
Check crime figures for your area:
Daghmoush, of New Street, Llanelli, was convicted of supplying a provisional driving licence knowing it was to be used in connection with fraud. He has no previous convictions in the UK save for one speeding matter.
Hannah George, for Daghmoush, said the defendant was currently unfit for work because of a wound he suffered in Syria.
Judge Huw Rees said the version of events the defendant had maintained through his interview and trial had been "incredible" and a "lying account" and he said in his view Daghmoush had been correctly convicted.
He said he had read reports into the defendant's background and it was clear he and his family had gone through considerable jeopardy and "very traumatic experiences" in leaving Syria and then spending five years in a Lebanese refugee camp before coming to the UK.
The judge said: "I note that you have settled into life in Wales and you are appreciative of the welcome you have had.
"Abusing your provisional driving licence in this way by letting somebody else use it to pass a driving test is not a way to repay that welcome and you should be thoroughly ashamed of yourself."
Judge Rees said an official document such as driving licence was an important document as underlined by the fact that the defendant could be jailed for up to two years under the sentencing guidelines.
Daghmoush was sentenced to six months in prison suspended for 12 months.
Speaking after the sentencing Andy Rice, head of DVSA counter-fraud and investigation, said: "DVSA's priority is to protect everyone from unsafe drivers and vehicles.
"Driving and theory tests exist to help ensure people have the correct knowledge, skills, and attitude to drive on our roads.
"Circumventing the tests puts lives in danger. We have methods in place to detect test fraud and will come down hard on the people involved in."