From a5d15453477c6844b1b3e262c34dcfdfb2e81471 Mon Sep 17 00:00:00 2001 From: Christopher Joe Date: Tue, 27 Jun 2017 12:22:58 +1200 Subject: [PATCH] Fix converted to getenv() --- src/TestSessionEnvironment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TestSessionEnvironment.php b/src/TestSessionEnvironment.php index c4e60ca..19f945c 100644 --- a/src/TestSessionEnvironment.php +++ b/src/TestSessionEnvironment.php @@ -249,7 +249,7 @@ class TestSessionEnvironment $state->database = $dbName; // In case it's changed by the call to SapphireTest::create_temp_db(); // Set existing one, assumes it already has been created - $prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_'; + $prefix = getenv('SS_DATABASE_PREFIX') ?: 'ss_'; $pattern = strtolower(sprintf('#^%stmpdb.*#', preg_quote($prefix, '#'))); if (!preg_match($pattern, $dbName)) { throw new InvalidArgumentException("Invalid database name format");