Permalink
Browse files

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

  • Loading branch information...
1 parent cea4e4e commit 266058e67a737ac39b789cf6b012b8b457396a91 @ceeram ceeram committed May 26, 2011
Showing with 2 additions and 4 deletions.
  1. +1 −1 lib/Cake/Core/App.php
  2. +1 −3 lib/Cake/Test/Case/Core/AppTest.php
View
@@ -499,10 +499,10 @@ public static function objects($type, $path = null, $cache = true) {
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 @@ function testListObjectsInPlugin() {
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 @@ function testListObjectsInPlugin() {
$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);

0 comments on commit 266058e

Please sign in to comment.