Revert "Fix missing objects in App::objects()"

This change caused non controller objects to show in the
controller list.  Reverting until a better implementation
can be done.

This reverts commit ba6f3c17fa.
This commit is contained in:
mark_story 2011-11-06 11:24:33 -05:00
parent cfe38985cf
commit 3fa0bdb60f
2 changed files with 8 additions and 3 deletions

View file

@ -422,9 +422,6 @@ class App {
if (empty($path)) { if (empty($path)) {
$path = self::path($type, $plugin); $path = self::path($type, $plugin);
if (empty($plugin)) {
$path = array_merge($path, App::core($type));
}
} }
foreach ((array)$path as $dir) { foreach ((array)$path as $dir) {

View file

@ -278,6 +278,14 @@ class AppTest extends CakeTestCase {
$this->assertTrue(in_array('Dispatcher', $result)); $this->assertTrue(in_array('Dispatcher', $result));
$this->assertTrue(in_array('Router', $result)); $this->assertTrue(in_array('Router', $result));
App::build(array(
'Model/Behavior' => App::core('Model/Behavior'),
'Controller' => App::core('Controller'),
'Controller/Component' => App::core('Controller/Component'),
'View' => App::core('View'),
'Model' => App::core('Model'),
'View/Helper' => App::core('View/Helper'),
), App::RESET);
$result = App::objects('behavior', null, false); $result = App::objects('behavior', null, false);
$this->assertTrue(in_array('TreeBehavior', $result)); $this->assertTrue(in_array('TreeBehavior', $result));
$result = App::objects('Model/Behavior', null, false); $result = App::objects('Model/Behavior', null, false);