Moving the sort to also sort plugin objects, sorting in test removed

This commit is contained in:
Ceeram 2011-05-26 19:33:36 +02:00
parent cea4e4e98e
commit 266058e67a
2 changed files with 2 additions and 4 deletions

View file

@ -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;
}

View file

@ -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);