From 7c5273e467bd373b04d83f20d3213befe0fc372b Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Fri, 12 May 2017 11:09:11 +0100 Subject: [PATCH] FIX Be less opinionated about test DB name --- src/TestSessionEnvironment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TestSessionEnvironment.php b/src/TestSessionEnvironment.php index a1e837d..dcf2183 100644 --- a/src/TestSessionEnvironment.php +++ b/src/TestSessionEnvironment.php @@ -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"); }