Applying patch from 'savant' Fixes usage of deprecated methods. Fixes #11

This commit is contained in:
mark_story 2009-08-07 22:45:48 -04:00
parent 0a1d8ca92a
commit ae628f7f72
2 changed files with 3 additions and 3 deletions

View file

@ -191,7 +191,7 @@ class TestTask extends Shell {
* @return string Class name the user chose.
**/
function getClassName($objectType) {
$options = Configure::listObjects(strtolower($objectType));
$options = App::objects(strtolower($objectType));
$this->out(sprintf(__('Choose a %s class', true), $objectType));
$keys = array();
foreach ($options as $key => $option) {

View file

@ -259,7 +259,7 @@ class TestTaskTest extends CakeTestCase {
* @return void
**/
function testGetClassName() {
$objects = Configure::listObjects('model');
$objects = App::objects('model');
$skip = $this->skipIf(empty($objects), 'No models in app, this test will fail. %s');
if ($skip) {
return;
@ -270,7 +270,7 @@ class TestTaskTest extends CakeTestCase {
$this->Task->setReturnValueAt(1, 'in', 1);
$result = $this->Task->getClassName('Model');
$options = Configure::listObjects('model');
$options = App::objects('model');
$this->assertEqual($result, $options[0]);
}