FIX Be less opinionated about test DB name

This commit is contained in:
Daniel Hensby 2017-05-12 11:09:11 +01:00 committed by Sam Minnée
parent beda9e158f
commit be78e58ff6
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");
}