Skip to content

Commit

Permalink
Fixing typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed May 2, 2011
1 parent 317aad9 commit 7fc5e8f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Core/App.php
Expand Up @@ -350,7 +350,7 @@ public static function build($paths = array(), $mode = App::PREPEND) {
}

if (!empty($paths[$type])) {
if ($mode === APP::PREPEND) {
if ($mode === App::PREPEND) {
$path = array_merge((array)$paths[$type], self::$__packages[$type]);
} else {
$path = array_merge(self::$__packages[$type], (array)$paths[$type]);
Expand Down
14 changes: 12 additions & 2 deletions lib/Cake/tests/Case/Core/AppTest.php
Expand Up @@ -31,7 +31,17 @@ function testBuild() {
$this->assertEqual($expected, $new);

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');
$expected = array(
APP . 'Model' . DS,
Expand All @@ -44,7 +54,7 @@ function testBuild() {
App::build(array(
'Model' => array('/path/to/models/'),
'Controller' => array('/path/to/controllers/'),
), APP::APPEND);
), App::APPEND);
$new = App::path('Model');
$expected = array(
APP . 'Model' . DS,
Expand Down

0 comments on commit 7fc5e8f

Please sign in to comment.