mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Applying patch from 'savant' Fixes usage of deprecated methods. Fixes #11
This commit is contained in:
parent
0a1d8ca92a
commit
ae628f7f72
2 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue