Fixed PHP notice that appeared the first time around the while(!$dbname || $dbConn->databaseExists($dbname)) loop ($dbname doesn't exist yet).

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40165 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Matt Peel 2007-08-15 10:12:59 +00:00
parent e6ed1b3dd5
commit 2c3cea4df0

View File

@ -49,6 +49,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
// Create a temporary database // Create a temporary database
$dbConn = DB::getConn(); $dbConn = DB::getConn();
$dbname = 'tmpdb' . rand(1000000,9999999);
while(!$dbname || $dbConn->databaseExists($dbname)) { while(!$dbname || $dbConn->databaseExists($dbname)) {
$dbname = 'tmpdb' . rand(1000000,9999999); $dbname = 'tmpdb' . rand(1000000,9999999);
} }