Finish unit tests for all server services

This commit is contained in:
Dane Everitt 2017-07-22 20:15:01 -05:00
parent 3add44d342
commit acbc52506c
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
21 changed files with 1609 additions and 206 deletions

View file

@ -47,7 +47,7 @@ class UsernameGenerationService
}
// Filter the Server Name
$name = trim(preg_replace('/[^\w]+/', '', $name), '_');
$name = trim(preg_replace('/[^A-Za-z0-9]+/', '', $name), '_');
$name = (strlen($name) < 1) ? str_random(6) : $name;
return strtolower(substr($name, 0, 6) . '_' . $unique);