Replace uniqid calls with $this->getUniqueID so tests pass again on windows

@MorrisJobke @LukasReschke 
while at it: adding PHPDoc to old code seems legit :see_no_evil: