Yes, you will get credit for a win if an opponent quits mid-battle.