From 2386a1115141c18fb286e425af957bf82389d288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 22 Jan 2011 01:11:22 -0430 Subject: [PATCH] fixing tests from last merge --- lib/Cake/Model/ConnectionManager.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php index 65187cb75..0f0ac3435 100644 --- a/lib/Cake/Model/ConnectionManager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -95,10 +95,7 @@ class ConnectionManager { self::_getConnectionObject($name); } - if (empty(self::$_connectionsEnum[$name])) { - throw new MissingDatasourceConfigException(array('config' => $name)); - } - + self::loadDataSource($name); $conn = self::$_connectionsEnum[$name]; $class = $conn['classname']; @@ -173,7 +170,7 @@ class ConnectionManager { App::uses($conn['classname'], $plugin . 'Model/Datasource' . $package); if (!class_exists($conn['classname'])) { - throw new MissingDatasourceFileException(array('class' => $conn['classname'], 'plugin' => $conn['plugin'])); + throw new MissingDatasourceFileException(array('class' => $conn['classname'], 'plugin' => $plugin)); } return true; } @@ -222,7 +219,7 @@ class ConnectionManager { if (!empty(self::$config->{$name})) { self::$_connectionsEnum[$name] = self::_connectionData(self::$config->{$name}); } else { - throw new MissingConnectionException(array('class' => $name)); + throw new MissingDatasourceConfigException(array('config' => $name)); } }