mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Moving the sort to also sort plugin objects, sorting in test removed
This commit is contained in:
parent
cea4e4e98e
commit
266058e67a
2 changed files with 2 additions and 4 deletions
|
@ -499,10 +499,10 @@ class App {
|
|||
if ($cache === true) {
|
||||
self::$__cache = true;
|
||||
}
|
||||
sort($objects);
|
||||
if ($plugin) {
|
||||
return $objects;
|
||||
}
|
||||
sort($objects);
|
||||
self::$__objects[$cacheLocation][$name] = $objects;
|
||||
self::$_objectCacheChange = true;
|
||||
}
|
||||
|
|
|
@ -319,7 +319,7 @@ class AppTest extends CakeTestCase {
|
|||
App::build(array(
|
||||
'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
|
||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||
));
|
||||
), true);
|
||||
CakePlugin::loadAll();
|
||||
|
||||
$result = App::objects('TestPlugin.model');
|
||||
|
@ -333,11 +333,9 @@ class AppTest extends CakeTestCase {
|
|||
$this->assertTrue(in_array('TestPluginPersisterOne', $result));
|
||||
|
||||
$result = App::objects('TestPlugin.helper');
|
||||
sort($result);
|
||||
$expected = array('OtherHelperHelper', 'PluggedHelperHelper', 'TestPluginAppHelper');
|
||||
$this->assertEquals($expected, $result);
|
||||
$result = App::objects('TestPlugin.View/Helper');
|
||||
sort($result);
|
||||
$expected = array('OtherHelperHelper', 'PluggedHelperHelper', 'TestPluginAppHelper');
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue