mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
FIX Be less opinionated about test DB name
This commit is contained in:
parent
beda9e158f
commit
be78e58ff6
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user