Fixing typo

This commit is contained in:
ADmad 2011-05-03 00:58:57 +05:30
parent 317aad9526
commit 7fc5e8f810
2 changed files with 13 additions and 3 deletions

View file

@ -350,7 +350,7 @@ class App {
} }
if (!empty($paths[$type])) { if (!empty($paths[$type])) {
if ($mode === APP::PREPEND) { if ($mode === App::PREPEND) {
$path = array_merge((array)$paths[$type], self::$__packages[$type]); $path = array_merge((array)$paths[$type], self::$__packages[$type]);
} else { } else {
$path = array_merge(self::$__packages[$type], (array)$paths[$type]); $path = array_merge(self::$__packages[$type], (array)$paths[$type]);

View file

@ -31,7 +31,17 @@ class AppImportTest extends CakeTestCase {
$this->assertEqual($expected, $new); $this->assertEqual($expected, $new);
App::build(); App::build();
App::build(array('Model' => array('/path/to/models/')), APP::APPEND); App::build(array('Model' => array('/path/to/models/')), App::PREPEND);
$new = App::path('Model');
$expected = array(
'/path/to/models/',
APP . 'Model' . DS,
APP . 'models' . DS
);
$this->assertEqual($expected, $new);
App::build();
App::build(array('Model' => array('/path/to/models/')), App::APPEND);
$new = App::path('Model'); $new = App::path('Model');
$expected = array( $expected = array(
APP . 'Model' . DS, APP . 'Model' . DS,
@ -44,7 +54,7 @@ class AppImportTest extends CakeTestCase {
App::build(array( App::build(array(
'Model' => array('/path/to/models/'), 'Model' => array('/path/to/models/'),
'Controller' => array('/path/to/controllers/'), 'Controller' => array('/path/to/controllers/'),
), APP::APPEND); ), App::APPEND);
$new = App::path('Model'); $new = App::path('Model');
$expected = array( $expected = array(
APP . 'Model' . DS, APP . 'Model' . DS,