diff --git a/code/TestSessionController.php b/code/TestSessionController.php index 71135cc..09576cc 100644 --- a/code/TestSessionController.php +++ b/code/TestSessionController.php @@ -44,6 +44,15 @@ class TestSessionController extends Controller { return $this->renderWith('TestSession_start'); } + public function DatabaseName() { + if($dbname = DB::get_alternative_database_name()) { + return $dbname; + } else { + $db = DB::getConn(); + if(method_exists($db, 'currentDatabase')) return $db->currentDatabase(); + } + } + public function set($request) { if(!SapphireTest::using_temp_db()) { throw new LogicException( diff --git a/templates/TestSession_start.ss b/templates/TestSession_start.ss index f7ffdf2..35f49f4 100644 --- a/templates/TestSession_start.ss +++ b/templates/TestSession_start.ss @@ -1,3 +1,4 @@ +

Started testing session. <% if Fixture %>Loaded fixture "$Fixture" into database.<% end_if %>