According to Amnesty International:
20-year-old Salwa Hosseini told Amnesty International that after she was arrested and taken to a military prison in Heikstep, she was made, with the other women, to take off all her clothes to be searched by a female prison guard, in a room with two open doors and a window. During the strip search, Salwa Hosseini said male soldiers were looking into the room and taking pictures of the naked women.
The women were then subjected to ‘virginity tests’ in a different room by a man in a white coat. They were threatened that “those not found to be virgins” would be charged with prostitution. According to information received by Amnesty International, one woman who said she was a virgin but whose test supposedly proved otherwise was beaten and given electric shocks.
“Women and girls must be able to express their views on the future of Egypt and protest against the government without being detained, tortured, or subjected to profoundly degrading and discriminatory treatment,” said Amnesty International.
“The army officers tried to further humiliate the women by allowing men to watch and photograph what was happening, with the implicit threat that the women could be at further risk of harm if the photographs were made public.”
One of those detainees, Samira Ibrahim (25), filed suit against the military-led government and won. Virginity tests are now verboten.
“The court orders that the execution of the procedure of virginity tests on girls inside military prisons be stopped,” said judge Aly Fekry, head of Cairo Administrative court. Hundreds of activists inside the courtroom cheered after the ruling was read out.
Note, this only applies to temporary detainees in military prisons, otherwise it's fair game, since virginity tests are cool in Islam. I suppose one can't expect too much change, even from a civilian court.