Spanish Prime Minister Pedro Sanchez's former transport minister denied graft allegations when questioned Thursday in court by a judge investigating a case that has embarrassed the government.