Changeset 310
- Timestamp:
- 03/03/10 12:41:24 (5 months ago)
- Location:
- trunk/server/www/cake
- Files:
-
- 40 modified
-
console/libs/console.php (modified) (1 diff)
-
console/libs/schema.php (modified) (2 diffs)
-
console/libs/shell.php (modified) (3 diffs)
-
console/libs/tasks/controller.php (modified) (1 diff)
-
console/libs/tasks/model.php (modified) (1 diff)
-
console/libs/tasks/project.php (modified) (4 diffs)
-
console/libs/tasks/view.php (modified) (2 diffs)
-
dispatcher.php (modified) (2 diffs)
-
libs/cache.php (modified) (2 diffs)
-
libs/cache/file.php (modified) (1 diff)
-
libs/cache/memcache.php (modified) (1 diff)
-
libs/class_registry.php (modified) (3 diffs)
-
libs/configure.php (modified) (4 diffs)
-
libs/controller/component.php (modified) (1 diff)
-
libs/controller/components/acl.php (modified) (1 diff)
-
libs/controller/components/email.php (modified) (1 diff)
-
libs/controller/controller.php (modified) (2 diffs)
-
libs/debugger.php (modified) (2 diffs)
-
libs/error.php (modified) (1 diff)
-
libs/file.php (modified) (1 diff)
-
libs/i18n.php (modified) (1 diff)
-
libs/inflector.php (modified) (1 diff)
-
libs/magic_db.php (modified) (3 diffs)
-
libs/model/behavior.php (modified) (1 diff)
-
libs/model/connection_manager.php (modified) (3 diffs)
-
libs/model/schema.php (modified) (2 diffs)
-
libs/multibyte.php (modified) (1 diff)
-
libs/router.php (modified) (1 diff)
-
libs/security.php (modified) (1 diff)
-
libs/string.php (modified) (1 diff)
-
libs/validation.php (modified) (1 diff)
-
libs/view/helpers/cache.php (modified) (1 diff)
-
libs/view/helpers/js.php (modified) (1 diff)
-
libs/view/helpers/xml.php (modified) (2 diffs)
-
libs/view/view.php (modified) (1 diff)
-
libs/xml.php (modified) (3 diffs)
-
tests/lib/cake_test_case.php (modified) (3 diffs)
-
tests/lib/cake_test_fixture.php (modified) (1 diff)
-
tests/lib/code_coverage_manager.php (modified) (3 diffs)
-
tests/lib/test_manager.php (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/www/cake/console/libs/console.php
r55 r310 65 65 $class = Inflector::camelize(r('.php', '', $model)); 66 66 $this->models[$model] = $class; 67 $this->{$class} = &new $class();67 $this->{$class} = new $class(); 68 68 } 69 69 $this->out('Model classes:'); -
trunk/server/www/cake/console/libs/schema.php
r5 r310 84 84 } 85 85 86 $this->Schema = &new CakeSchema(compact('name', 'path', 'file', 'connection'));86 $this->Schema = new CakeSchema(compact('name', 'path', 'file', 'connection')); 87 87 } 88 88 /** … … 143 143 144 144 if ($snapshot === true) { 145 $Folder = &new Folder($this->Schema->path);145 $Folder = new Folder($this->Schema->path); 146 146 $result = $Folder->read(); 147 147 -
trunk/server/www/cake/console/libs/shell.php
r5 r310 201 201 function _loadDbConfig() { 202 202 if (config('database') && class_exists('DATABASE_CONFIG')) { 203 $this->DbConfig = &new DATABASE_CONFIG();203 $this->DbConfig = new DATABASE_CONFIG(); 204 204 return true; 205 205 } … … 223 223 224 224 if ($this->uses === true && App::import('Model', 'AppModel')) { 225 $this->AppModel = &new AppModel(false, false, false);225 $this->AppModel = new AppModel(false, false, false); 226 226 return true; 227 227 } … … 291 291 $this->taskNames[] = $taskName; 292 292 if (!PHP5) { 293 $this->{$taskName} = &new $taskClass($this->Dispatch);293 $this->{$taskName} = new $taskClass($this->Dispatch); 294 294 } else { 295 295 $this->{$taskName} = new $taskClass($this->Dispatch); -
trunk/server/www/cake/console/libs/tasks/controller.php
r5 r310 250 250 } 251 251 $actions = null; 252 $modelObj = &new $currentModelName();252 $modelObj = new $currentModelName(); 253 253 $controllerPath = $this->_controllerPath($controllerName); 254 254 $pluralName = $this->_pluralName($currentModelName); -
trunk/server/www/cake/console/libs/tasks/model.php
r5 r310 339 339 App::import('Model'); 340 340 $tmpModelName = $this->_modelName($otherTable); 341 $tempOtherModel = &new Model(array('name' => $tmpModelName, 'table' => $otherTable, 'ds' => $model->useDbConfig));341 $tempOtherModel = new Model(array('name' => $tmpModelName, 'table' => $otherTable, 'ds' => $model->useDbConfig)); 342 342 $modelFieldsTemp = $tempOtherModel->schema(); 343 343 -
trunk/server/www/cake/console/libs/tasks/project.php
r5 r310 193 193 */ 194 194 function securitySalt($path) { 195 $File = &new File($path . 'config' . DS . 'core.php');195 $File = new File($path . 'config' . DS . 'core.php'); 196 196 $contents = $File->read(); 197 197 if (preg_match('/([\\t\\x20]*Configure::write\\(\\\'Security.salt\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) { … … 217 217 function corePath($path) { 218 218 if (dirname($path) !== CAKE_CORE_INCLUDE_PATH) { 219 $File = &new File($path . 'webroot' . DS . 'index.php');219 $File = new File($path . 'webroot' . DS . 'index.php'); 220 220 $contents = $File->read(); 221 221 if (preg_match('/([\\t\\x20]*define\\(\\\'CAKE_CORE_INCLUDE_PATH\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) { … … 228 228 } 229 229 230 $File = &new File($path . 'webroot' . DS . 'test.php');230 $File = new File($path . 'webroot' . DS . 'test.php'); 231 231 $contents = $File->read(); 232 232 if (preg_match('/([\\t\\x20]*define\\(\\\'CAKE_CORE_INCLUDE_PATH\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) { … … 249 249 */ 250 250 function cakeAdmin($name) { 251 $File = &new File(CONFIGS . 'core.php');251 $File = new File(CONFIGS . 'core.php'); 252 252 $contents = $File->read(); 253 253 if (preg_match('%([/\\t\\x20]*Configure::write\(\'Routing.admin\',[\\t\\x20\'a-z]*\\);)%', $contents, $match)) { -
trunk/server/www/cake/console/libs/tasks/view.php
r5 r310 248 248 } 249 249 $controllerClassName = $this->controllerName . 'Controller'; 250 $controllerObj = &new $controllerClassName();250 $controllerObj = new $controllerClassName(); 251 251 $controllerObj->constructClasses(); 252 252 $modelClass = $controllerObj->modelClass; … … 291 291 } 292 292 $filename = $this->path . $this->controllerPath . DS . Inflector::underscore($action) . '.ctp'; 293 $Folder = &new Folder($this->path . $this->controllerPath, true);293 $Folder = new Folder($this->path . $this->controllerPath, true); 294 294 $errors = $Folder->errors(); 295 295 if (empty($errors)) { -
trunk/server/www/cake/dispatcher.php
r5 r310 469 469 } 470 470 $this->params = $params; 471 $controller = &new $ctrlClass();471 $controller = new $ctrlClass(); 472 472 } 473 473 return $controller; … … 701 701 } 702 702 $controller = null; 703 $view = &new View($controller, false);703 $view = new View($controller, false); 704 704 return $view->renderCache($filename, getMicrotime()); 705 705 } -
trunk/server/www/cake/libs/cache.php
r5 r310 69 69 static $instance = array(); 70 70 if (!$instance) { 71 $instance[0] = &new Cache();71 $instance[0] = new Cache(); 72 72 } 73 73 return $instance[0]; … … 153 153 return false; 154 154 } 155 $_this->_Engine[$name] = &new $cacheClass();155 $_this->_Engine[$name] = new $cacheClass(); 156 156 } 157 157 -
trunk/server/www/cake/libs/cache/file.php
r5 r310 87 87 require LIBS . 'file.php'; 88 88 } 89 $this->__File = &new File($this->settings['path'] . DS . 'cake');89 $this->__File = new File($this->settings['path'] . DS . 'cake'); 90 90 } 91 91 -
trunk/server/www/cake/libs/cache/memcache.php
r5 r310 74 74 if (!isset($this->__Memcache)) { 75 75 $return = false; 76 $this->__Memcache = &new Memcache();76 $this->__Memcache = new Memcache(); 77 77 foreach ($this->settings['servers'] as $server) { 78 78 $parts = explode(':', $server); -
trunk/server/www/cake/libs/class_registry.php
r5 r310 66 66 static $instance = array(); 67 67 if (!$instance) { 68 $instance[0] = &new ClassRegistry();68 $instance[0] = new ClassRegistry(); 69 69 } 70 70 return $instance[0]; … … 132 132 133 133 if (class_exists($class) || App::import($type, $pluginPath . $class)) { 134 ${$class} = &new $class($settings);134 ${$class} = new $class($settings); 135 135 } elseif ($type === 'Model') { 136 136 if ($plugin && class_exists($plugin . 'AppModel')) { … … 140 140 } 141 141 $settings['name'] = $class; 142 ${$class} = &new $appModel($settings);142 ${$class} = new $appModel($settings); 143 143 } 144 144 -
trunk/server/www/cake/libs/configure.php
r5 r310 134 134 static $instance = array(); 135 135 if (!$instance) { 136 $instance[0] = &new Configure();136 $instance[0] = new Configure(); 137 137 $instance[0]->__loadBootstrap($boot); 138 138 } … … 224 224 } 225 225 $items = array(); 226 $Folder = &new Folder($path);226 $Folder = new Folder($path); 227 227 $contents = $Folder->read(false, true); 228 228 … … 901 901 static $instance = array(); 902 902 if (!$instance) { 903 $instance[0] = &new App();903 $instance[0] = new App(); 904 904 $instance[0]->__map = Cache::read('file_map', '_cake_core_'); 905 905 } … … 941 941 require LIBS . 'folder.php'; 942 942 } 943 $Folder = &new Folder();943 $Folder = new Folder(); 944 944 $directories = $Folder->tree($path, false, 'dir'); 945 945 $this->__paths[$path] = $directories; -
trunk/server/www/cake/libs/controller/component.php
r5 r310 238 238 } else { 239 239 if ($componentCn === 'SessionComponent') { 240 $object->{$component} = &new $componentCn($base);240 $object->{$component} = new $componentCn($base); 241 241 } else { 242 $object->{$component} = &new $componentCn();242 $object->{$component} = new $componentCn(); 243 243 } 244 244 $object->{$component}->enabled = true; -
trunk/server/www/cake/libs/controller/components/acl.php
r5 r310 57 57 } 58 58 } 59 $this->_Instance = &new $name();59 $this->_Instance = new $name(); 60 60 $this->_Instance->initialize($this); 61 61 } -
trunk/server/www/cake/libs/controller/components/email.php
r5 r310 657 657 App::import('Core', array('Socket')); 658 658 659 $this->__smtpConnection = &new CakeSocket(array_merge(array('protocol'=>'smtp'), $this->smtpOptions));659 $this->__smtpConnection = new CakeSocket(array_merge(array('protocol'=>'smtp'), $this->smtpOptions)); 660 660 661 661 if (!$this->__smtpConnection->connect()) { -
trunk/server/www/cake/libs/controller/controller.php
r5 r310 310 310 $this->modelClass = Inflector::classify($this->name); 311 311 $this->modelKey = Inflector::underscore($this->modelClass); 312 $this->Component = &new Component();312 $this->Component = new Component(); 313 313 314 314 $childMethods = get_class_methods($this); … … 748 748 } 749 749 750 $View = &new $viewClass($this);750 $View = new $viewClass($this); 751 751 752 752 if (!empty($this->modelNames)) { -
trunk/server/www/cake/libs/debugger.php
r5 r310 97 97 if (!empty($class)) { 98 98 if (!$instance || strtolower($class) != strtolower(get_class($instance[0]))) { 99 $instance[0] = &new $class();99 $instance[0] = new $class(); 100 100 if (Configure::read() > 0) { 101 101 Configure::version(); // Make sure the core config is loaded … … 106 106 107 107 if (!$instance) { 108 $instance[0] = &new Debugger();108 $instance[0] = new Debugger(); 109 109 if (Configure::read() > 0) { 110 110 Configure::version(); // Make sure the core config is loaded -
trunk/server/www/cake/libs/error.php
r5 r310 87 87 if ($__previousError != array($method, $messages)) { 88 88 $__previousError = array($method, $messages); 89 $this->controller = &new CakeErrorController();89 $this->controller = new CakeErrorController(); 90 90 } else { 91 $this->controller = &new Controller();91 $this->controller = new Controller(); 92 92 $this->controller->viewPath = 'errors'; 93 93 } -
trunk/server/www/cake/libs/file.php
r5 r310 94 94 function __construct($path, $create = false, $mode = 0755) { 95 95 parent::__construct(); 96 $this->Folder = &new Folder(dirname($path), $create, $mode);96 $this->Folder = new Folder(dirname($path), $create, $mode); 97 97 if (!is_dir($path)) { 98 98 $this->name = basename($path); -
trunk/server/www/cake/libs/i18n.php
r5 r310 105 105 static $instance = array(); 106 106 if (!$instance) { 107 $instance[0] = &new I18n();108 $instance[0]->l10n = &new L10n();107 $instance[0] = new I18n(); 108 $instance[0]->l10n = new L10n(); 109 109 } 110 110 return $instance[0]; -
trunk/server/www/cake/libs/inflector.php
r5 r310 129 129 130 130 if (!$instance) { 131 $instance[0] = &new Inflector();131 $instance[0] = new Inflector(); 132 132 if (file_exists(CONFIGS.'inflections.php')) { 133 133 include(CONFIGS.'inflections.php'); -
trunk/server/www/cake/libs/magic_db.php
r5 r310 54 54 $data = $magicDb; 55 55 } else { 56 $File = &new File($magicDb);56 $File = new File($magicDb); 57 57 if (!$File->exists()) { 58 58 return false; … … 159 159 160 160 $matches = array(); 161 $MagicFileResource = &new MagicFileResource($file);161 $MagicFileResource = new MagicFileResource($file); 162 162 foreach ($this->db['database'] as $format) { 163 163 $magic = $format[0]; … … 203 203 function __construct($file) { 204 204 if (file_exists($file)) { 205 $this->resource = &new File($file);205 $this->resource = new File($file); 206 206 } else { 207 207 $this->resource = $file; -
trunk/server/www/cake/libs/model/behavior.php
r5 r310 277 277 $this->{$name} = new $class; 278 278 } else { 279 $this->{$name} = &new $class;279 $this->{$name} = new $class; 280 280 } 281 281 } elseif (isset($this->{$name}->settings) && isset($this->{$name}->settings[$this->modelName])) { -
trunk/server/www/cake/libs/model/connection_manager.php
r5 r310 64 64 function __construct() { 65 65 if (class_exists('DATABASE_CONFIG')) { 66 $this->config = &new DATABASE_CONFIG();66 $this->config = new DATABASE_CONFIG(); 67 67 } 68 68 } … … 78 78 79 79 if (!$instance) { 80 $instance[0] = &new ConnectionManager();80 $instance[0] = new ConnectionManager(); 81 81 } 82 82 … … 104 104 $class = $conn['classname']; 105 105 $_this->loadDataSource($name); 106 $_this->_dataSources[$name] = &new $class($_this->config->{$name});106 $_this->_dataSources[$name] = new $class($_this->config->{$name}); 107 107 $_this->_dataSources[$name]->configKeyName = $name; 108 108 } else { -
trunk/server/www/cake/libs/model/schema.php
r5 r310 159 159 160 160 if (class_exists($class)) { 161 $Schema = &new $class($options);161 $Schema = new $class($options); 162 162 return $Schema; 163 163 } … … 352 352 353 353 354 $File = &new File($path . DS . $file, true);354 $File = new File($path . DS . $file, true); 355 355 $header = '$Id'; 356 356 $content = "<?php \n/* SVN FILE: $header$ */\n/* ". $name ." schema generated on: " . date('Y-m-d H:m:s') . " : ". time() . "*/\n{$out}?>"; -
trunk/server/www/cake/libs/multibyte.php
r5 r310 275 275 276 276 if (!$instance) { 277 $instance[0] = &new Multibyte();277 $instance[0] = new Multibyte(); 278 278 } 279 279 return $instance[0]; -
trunk/server/www/cake/libs/router.php
r5 r310 171 171 172 172 if (!$instance) { 173 $instance[0] = &new Router();173 $instance[0] = new Router(); 174 174 $instance[0]->__admin = Configure::read('Routing.admin'); 175 175 } -
trunk/server/www/cake/libs/security.php
r5 r310 51 51 static $instance = array(); 52 52 if (!$instance) { 53 $instance[0] = &new Security;53 $instance[0] = new Security; 54 54 } 55 55 return $instance[0]; -
trunk/server/www/cake/libs/string.php
r5 r310 43 43 44 44 if (!$instance) { 45 $instance[0] = &new String();45 $instance[0] = new String(); 46 46 } 47 47 return $instance[0]; -
trunk/server/www/cake/libs/validation.php
r5 r310 120 120 121 121 if (!$instance) { 122 $instance[0] = &new Validation();122 $instance[0] = new Validation(); 123 123 } 124 124 return $instance[0]; -
trunk/server/www/cake/libs/view/helpers/cache.php
r5 r310 253 253 } 254 254 255 $file .= '$controller = &new ' . $this->controllerName . 'Controller();255 $file .= '$controller = new ' . $this->controllerName . 'Controller(); 256 256 $controller->plugin = $this->plugin = \''.$this->plugin.'\'; 257 257 $controller->helpers = $this->helpers = unserialize(\'' . serialize($this->helpers) . '\'); -
trunk/server/www/cake/libs/view/helpers/js.php
r5 r310 137 137 138 138 $func .= "'" . Router::url($url) . "'"; 139 $ajax = &new AjaxHelper();139 $ajax = new AjaxHelper(); 140 140 $func .= ", " . $ajax->__optionsForAjax($options) . ")"; 141 141 -
trunk/server/www/cake/libs/view/helpers/xml.php
r5 r310 47 47 function __construct() { 48 48 parent::__construct(); 49 $this->Xml = &new Xml();49 $this->Xml = new Xml(); 50 50 $this->Xml->options(array('verifyNs' => false)); 51 51 } … … 153 153 */ 154 154 function serialize($data, $options = array()) { 155 $data = &new Xml($data, array_merge(array('attributes' => false, 'format' => 'attributes'), $options));155 $data = new Xml($data, array_merge(array('attributes' => false, 'format' => 'attributes'), $options)); 156 156 return $data->toString(array_merge(array('header' => false), $options)); 157 157 } -
trunk/server/www/cake/libs/view/view.php
r5 r310 742 742 } 743 743 } 744 $loaded[$helper] = &new $helperCn($options);744 $loaded[$helper] = new $helperCn($options); 745 745 $vars = array( 746 746 'base', 'webroot', 'here', 'params', 'action', 'data', 'themeWeb', 'plugin' -
trunk/server/www/cake/libs/xml.php
r5 r310 148 148 */ 149 149 function &createNode($name = null, $value = null, $namespace = false) { 150 $node = &new XmlNode($name, $value, $namespace);150 $node = new XmlNode($name, $value, $namespace); 151 151 $node->setParent($this); 152 152 return $node; … … 162 162 */ 163 163 function &createElement($name = null, $value = null, $attributes = array(), $namespace = false) { 164 $element = &new XmlElement($name, $value, $attributes, $namespace);164 $element = new XmlElement($name, $value, $attributes, $namespace); 165 165 $element->setParent($this); 166 166 return $element; … … 1362 1362 1363 1363 if (!$instance) { 1364 $instance[0] = &new XmlManager();1364 $instance[0] = new XmlManager(); 1365 1365 } 1366 1366 return $instance[0]; -
trunk/server/www/cake/tests/lib/cake_test_case.php
r5 r310 195 195 196 196 foreach ($models as $model) { 197 $fixture = &new CakeTestFixture($this->db);197 $fixture = new CakeTestFixture($this->db); 198 198 199 199 $fixture->name = $model['model'] . 'Test'; … … 283 283 $params = array_diff_key($params, array('data' => null, 'method' => null, 'return' => null)); 284 284 285 $dispatcher = &new CakeTestDispatcher();285 $dispatcher = new CakeTestDispatcher(); 286 286 $dispatcher->testCase($this); 287 287 … … 729 729 require_once($fixtureFile); 730 730 $fixtureClass = Inflector::camelize($fixture) . 'Fixture'; 731 $this->_fixtures[$this->fixtures[$index]] = &new $fixtureClass($this->db);731 $this->_fixtures[$this->fixtures[$index]] = new $fixtureClass($this->db); 732 732 $this->_fixtureClassMap[Inflector::camelize($fixture)] = $this->fixtures[$index]; 733 733 } -
trunk/server/www/cake/tests/lib/cake_test_fixture.php
r5 r310 77 77 ClassRegistry::flush(); 78 78 } elseif (isset($import['table'])) { 79 $model = &new Model(null, $import['table'], $import['connection']);79 $model = new Model(null, $import['table'], $import['connection']); 80 80 $db =& ConnectionManager::getDataSource($import['connection']); 81 81 $db->cacheSources = false; -
trunk/server/www/cake/tests/lib/code_coverage_manager.php
r5 r310 79 79 static $instance = array(); 80 80 if (!$instance) { 81 $instance[0] = &new CodeCoverageManager();81 $instance[0] = new CodeCoverageManager(); 82 82 } 83 83 return $instance[0]; … … 477 477 } 478 478 } 479 $testManager = &new TestManager();479 $testManager = new TestManager(); 480 480 $testFile = str_replace(array('/', $testManager->_testExtension), array(DS, '.php'), $file); 481 481 482 $folder = &new Folder();482 $folder = new Folder(); 483 483 $folder->cd(ROOT . DS . CAKE_TESTS_LIB); 484 484 $contents = $folder->ls(); … … 506 506 function __testObjectFilesFromGroupFile($groupFile, $isApp = true) { 507 507 $manager = CodeCoverageManager::getInstance(); 508 $testManager = &new TestManager();508 $testManager = new TestManager(); 509 509 510 510 $path = TESTS . 'groups'; -
trunk/server/www/cake/tests/lib/test_manager.php
r5 r310 78 78 */ 79 79 function runAllTests(&$reporter, $testing = false) { 80 $manager = &new TestManager();80 $manager = new TestManager(); 81 81 82 82 $testCases =& $manager->_getTestFileList($manager->_getTestsPath()); 83 83 if ($manager->appTest) { 84 $test = &new GroupTest('All App Tests');84 $test = new GroupTest('All App Tests'); 85 85 } else if ($manager->pluginTest) { 86 $test = &new GroupTest('All ' . Inflector::humanize($manager->pluginTest) . ' Plugin Tests');86 $test = new GroupTest('All ' . Inflector::humanize($manager->pluginTest) . ' Plugin Tests'); 87 87 } else { 88 $test = &new GroupTest('All Core Tests');88 $test = new GroupTest('All Core Tests'); 89 89 } 90 90 … … 108 108 */ 109 109 function runTestCase($testCaseFile, &$reporter, $testing = false) { 110 $manager = &new TestManager();110 $manager = new TestManager(); 111 111 112 112 $testCaseFileWithPath = $manager->_getTestsPath() . DS . $testCaseFile; … … 121 121 } 122 122 123 $test = &new GroupTest("Individual test case: " . $testCaseFile);123 $test = new GroupTest("Individual test case: " . $testCaseFile); 124 124 $test->addTestFile($testCaseFileWithPath); 125 125 return $test->run($reporter); … … 134 134 */ 135 135 function runGroupTest($groupTestName, &$reporter) { 136 $manager = &new TestManager();136 $manager = new TestManager(); 137 137 $filePath = $manager->_getTestsPath('groups') . DS . strtolower($groupTestName) . $manager->_groupExtension; 138 138 … … 142 142 143 143 require_once $filePath; 144 $test = &new GroupTest($groupTestName . ' group test');144 $test = new GroupTest($groupTestName . ' group test'); 145 145 foreach ($manager->_getGroupTestClassNames($filePath) as $groupTest) { 146 146 $testCase = new $groupTest(); … … 161 161 */ 162 162 function addTestCasesFromDirectory(&$groupTest, $directory = '.') { 163 $manager = &new TestManager();163 $manager = new TestManager(); 164 164 $testCases =& $manager->_getTestFileList($directory); 165 165 foreach ($testCases as $testCase) { … … 176 176 */ 177 177 function addTestFile(&$groupTest, $file) { 178 $manager = &new TestManager();178 $manager = new TestManager(); 179 179 180 180 if (file_exists($file.'.test.php')) { … … 191 191 */ 192 192 function &getTestCaseList() { 193 $manager = &new TestManager();193 $manager = new TestManager(); 194 194 $return = $manager->_getTestCaseList($manager->_getTestsPath()); 195 195 return $return; … … 223 223 */ 224 224 function &getGroupTestList() { 225 $manager = &new TestManager();225 $manager = new TestManager(); 226 226 $return = $manager->_getTestGroupList($manager->_getTestsPath('groups')); 227 227 return $return; … … 359 359 */ 360 360 function getExtension($type = 'test') { 361 $manager = &new TestManager();361 $manager = new TestManager(); 362 362 if ($type == 'test') { 363 363 return $manager->_testExtension; … … 379 379 */ 380 380 function &getGroupTestList() { 381 $manager = &new CliTestManager();381 $manager = new CliTestManager(); 382 382 $groupTests =& $manager->_getTestGroupList($manager->_getTestsPath('groups')); 383 383 $buffer = "Available Group Test:\n"; … … 394 394 */ 395 395 function &getTestCaseList() { 396 $manager = &new CliTestManager();396 $manager = new CliTestManager(); 397 397 $testCases =& $manager->_getTestCaseList($manager->_getTestsPath()); 398 398 $buffer = "Available Test Cases:\n"; … … 437 437 */ 438 438 function &getGroupTestList() { 439 $manager = &new TextTestManager();439 $manager = new TextTestManager(); 440 440 $groupTests =& $manager->_getTestGroupList($manager->_getTestsPath('groups')); 441 441 … … 464 464 */ 465 465 function &getTestCaseList() { 466 $manager = &new TextTestManager();466 $manager = new TextTestManager(); 467 467 $testCases =& $manager->_getTestCaseList($manager->_getTestsPath()); 468 468 … … 525 525 function &getGroupTestList() { 526 526 $urlExtra = ''; 527 $manager = &new HtmlTestManager();527 $manager = new HtmlTestManager(); 528 528 $groupTests =& $manager->_getTestGroupList($manager->_getTestsPath('groups')); 529 529 … … 553 553 function &getTestCaseList() { 554 554 $urlExtra = ''; 555 $manager = &new HtmlTestManager();555 $manager = new HtmlTestManager(); 556 556 $testCases =& $manager->_getTestCaseList($manager->_getTestsPath()); 557 557 … … 598 598 case CAKE_TEST_OUTPUT_HTML: 599 599 require_once CAKE_TESTS_LIB . 'cake_reporter.php'; 600 $Reporter = &new CakeHtmlReporter();600 $Reporter = new CakeHtmlReporter(); 601 601 break; 602 602 default: 603 $Reporter = &new TextReporter();603 $Reporter = new TextReporter(); 604 604 break; 605 605 } … … 731 731 require CAKE . 'dispatcher.php'; 732 732 } 733 $dispatch = &new Dispatcher();733 $dispatch = new Dispatcher(); 734 734 $dispatch->baseUrl(); 735 735 define('BASE', $dispatch->webroot);
