FIX Be less opinionated about test DB name

This commit is contained in:
Daniel Hensby 2017-05-12 11:09:11 +01:00
parent beda9e158f
commit 7c5273e467
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ class TestSessionEnvironment
// Set existing one, assumes it already has been created
$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';
$pattern = strtolower(sprintf('#^%stmpdb\d{7}#', $prefix));
$pattern = strtolower(sprintf('#^%stmpdb.*#', preg_quote($prefix, '#')));
if (!preg_match($pattern, $dbName)) {
throw new InvalidArgumentException("Invalid database name format");
}