Skip to content

Commit

Permalink
Removing reference operators and removing DS in TestManager and CakeT…
Browse files Browse the repository at this point in the history
…estCase.
  • Loading branch information
markstory committed Apr 15, 2010
1 parent 20b0b1f commit 286e966
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cake/tests/lib/cake_test_case.php
Expand Up @@ -693,14 +693,14 @@ protected function _initDb() {
if ($testDbAvailable) {
// Try for test DB
restore_error_handler();
@$db =& ConnectionManager::getDataSource('test');
@$db = ConnectionManager::getDataSource('test');
set_error_handler('simpleTestErrorHandler');
$testDbAvailable = $db->isConnected();
}

// Try for default DB
if (!$testDbAvailable) {
$db =& ConnectionManager::getDataSource('default');
$db = ConnectionManager::getDataSource('default');
$_prefix = $db->config['prefix'];
$db->config['prefix'] = 'test_suite_';
}
Expand All @@ -709,7 +709,7 @@ protected function _initDb() {
$db->config['prefix'] = $_prefix;

// Get db connection
$this->db =& ConnectionManager::getDataSource('test_suite');
$this->db = ConnectionManager::getDataSource('test_suite');
$this->db->cacheSources = false;

ClassRegistry::config(array('ds' => 'test_suite'));
Expand Down Expand Up @@ -789,7 +789,7 @@ protected function _loadFixtures() {
* @return array
* @access private
*/
function __array_permute($items, $perms = array()) {
private function __array_permute($items, $perms = array()) {
static $permuted;
if (empty($perms)) {
$permuted = array();
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/test_manager.php
Expand Up @@ -365,7 +365,7 @@ protected function _getTestsPath($type = 'cases') {
$result = APP_TEST_GROUPS;
}
} else if (!empty($this->pluginTest)) {
$_pluginBasePath = APP . 'plugins' . DS . $this->pluginTest . DS . 'tests';
$_pluginBasePath = APP . 'plugins/' . $this->pluginTest . '/tests';
$pluginPath = App::pluginPath($this->pluginTest);
if (file_exists($pluginPath . DS . 'tests')) {
$_pluginBasePath = $pluginPath . DS . 'tests';
Expand Down

0 comments on commit 286e966

Please sign in to comment.